Throw Error

Discover more about the Throw Error component and how to use it on the Digibee Integration Platform.

Throw Error throws an error inside a pipeline or subpipeline. It can be used to:

  • interrupt a pipeline with an error.

  • interrupt a component that uses subpipelines for processing.

Parameters

Take a look at the configuration options for the component. Parameters supported by Double Braces expressions are marked with (DB).

Throw Error in Action

Treating standard errors (customErrorEnabled)

Throw Error can be used to treat standard errors. Standard errors are those that follow the definitions of the Digibee Integration Platform and that contain a code and a message.

When this type of error results in the pipeline interruption, then the following output is produced:

{
  "timestamp": <a long number informing the timestamp when the error was generated>,
  "error": <the configured message>,
  "exception": "PipelineEngineRuntimeException",
  "code": <the configured code>
}

Treating custom errors

Throw Error can also be used to treat custom errors. In this case, a complete JSON object is informed in the component configuration and lately informed in the output of the error-resulting pipeline.

Some triggers, such as REST, HTTP, and HTTP File, need to receive a code and an error property in the pipeline output to prepare the return code of the HTTP call.

Components that use subpipelines

When Throw Error is used in a component that uses the onProcess subpipeline, the configured error is informed as the input of the onException subpipeline. If the Custom Error (JSON) option is filled, then the content of the JSON object is the same as the one described in the Treating standard errors or Treating custom errors sections.

To better understand the concept, read the article Subpipelines.

Last updated