# Error Handling

When a flow is processing a message and a problem is encountered within a node, the execution of the flow will be transferred to any registered Catch node within the flow.

If a Catch node is present in the flow and the node where the error was originated is registered on it, the error is said to be handled, otherwise the error is said to be unhandled.

  • Handled Errors:

A Catch node will received the error thrown by the affected node and it will create an error property with the structure below, that will be injected into the msg before sending to its connected node.

error: {
  name: <Error Name>
  message: <Error Description>
  stack: <Stack trace of the error (used for support only)>
  source: {
    id: <node id where the error was originated>
    type: <node type where the error was originated>
    name: <node name>

A Catch node can be registered to captured errors occurred in one or many nodes. And you can place as many Catch nodes in a flow. Please refer to Catch node in the reference section for more details.

  • Unhandled Errors:

    Any error not handled by a Catch node will result in a HTTP 500 Internal Server error being returned to the client.

    The description of the error will be included in the body of the response.