Skip to main content
Skip table of contents

Error Handlers

Get Error Handler(s)

GET

{{baseUrl}}/orchestrator/api/apps/<app_id>/error-handlers/

Gets the Error Handler(s) by app_id.

Click to see the details

URL Parameters

Name

Type

Description

Example

app_id

uuid

The Application ID that the error handlers belong to.

"9b399774-3a0a-40c1-8a1c-4a124170b6f3"

Response (Success)

JSON
HTTP/1.1 200 OK

Returns the list of Error Handlers.

Example

JSON
[
    {
        "handler": {
            "name": "",
            "nodeType": "",
            "component_id": "",
            "configuration": {
                "input_fields": {},
                "output_fields": []
            }
        },
        "error_types": [],
        "error_sources": []
    },
    {
        "handler": {
            "name": "flow_name",
            "nodeType": "Flow",
            "component_id": "uuid.flow_name.Flows.orc.flowteam",
            "configuration": {
                "input_fields": {},
                "output_fields": []
            }
        },
        "error_types": [
            "AgentRequest",
            "MaxContinuousAgentRequests"
        ],
        "error_sources": [
            "error-sources-here"
        ]
    },
    {
        "error_types": [
            "NoInput",
            "ContinuousNoInputs"
        ],
        "error_sources": [
            "ZipCode",
            "My_Intelli_miniApp"
        ],
        "handler": {
            "component_id": "111111.111111.111111.11111.111111",
            "configuration": {
                "input_fields": {
                    "input_1": "value_1",
                    "input_2": "value_2",
                    "input_3": "value_3"
                }
            }
        }
    }
]

Response (Failed)

JSON
HTTP/1.1 404 NOT_FOUND

Create/Update Error Handlers

PUT

{{baseUrl}}/orchestrator/api/apps/<app_id>/error-handlers/

Both creating and updating Error Handlers can be done through the same PUT request by updating the list of Error Handlers.

Click to see the details

URL Parameters

Name

Type

Description

Example

app_id

uuid

The Application ID that the error handlers belong to.

"9b399774-3a0a-40c1-8a1c-4a124170b6f3"

Request Payload

List of Error Handlers.

Name

Type

Default

Description

Required

error_types

array[string]

-

Error type(s) that trigger the error handler. If multiple are specified, they are combined with OR conditions.

If both categories "error_types" and "error_sources" are specified, then the categories as a whole are combined with an AND condition, for example, (error_type1 OR error_type2) AND (error_source1 OR error_source2).

no

error_sources

array[string]

-

Error source(s) that trigger the error handler. If multiple are specified, they are combined with OR conditions.

If both categories "error_types" and "error_sources" are specified, then the categories as a whole are combined with an AND condition, for example, (error_type1 OR error_type2) AND (error_source1 OR error_source2).

no

handler

object

-

Component that handles the error occurrence (for example, a Flow or a miniApp).

no

Example

JSON
[
    {
        "handler": {
            "name": "",
            "nodeType": "",
            "component_id": "",
            "configuration": {
                "input_fields": {},
                "output_fields": []
            }
        },
        "error_types": [],
        "error_sources": []
    },
    {
        "handler": {
            "name": "flow_name",
            "nodeType": "Flow",
            "component_id": "uuid.flow_name.Flows.orc.flowteam",
            "configuration": {
                "input_fields": {},
                "output_fields": []
            }
        },
        "error_types": [
            "AgentRequest",
            "MaxContinuousAgentRequests"
        ],
        "error_sources": [
            "error-sources-here"
        ]
    },
    {
        "error_types": [
            "NoInput",
            "ContinuousNoInputs"
        ],
        "error_sources": [
            "ZipCode",
            "My_Intelli_miniApp"
        ],
        "handler": {
            "component_id": "111111.111111.111111.11111.111111",
            "configuration": {
                "input_fields": {
                    "input_1": "value_1",
                    "input_2": "value_2",
                    "input_3": "value_3"
                }
            }
        }
    }
]

Response (Success)

JSON
HTTP/1.1 201 CREATED

Returns the list of Error Handlers.

Example

JSON
[
    {
        "handler": {
            "name": "",
            "nodeType": "",
            "component_id": "",
            "configuration": {
                "input_fields": {},
                "output_fields": []
            }
        },
        "error_types": [],
        "error_sources": []
    },
    {
        "handler": {
            "name": "flow_name",
            "nodeType": "Flow",
            "component_id": "uuid.flow_name.Flows.orc.flowteam",
            "configuration": {
                "input_fields": {},
                "output_fields": []
            }
        },
        "error_types": [
            "AgentRequest",
            "MaxContinuousAgentRequests"
        ],
        "error_sources": [
            "error-sources-here"
        ]
    },
    {
        "error_types": [
            "NoInput",
            "ContinuousNoInputs"
        ],
        "error_sources": [
            "ZipCode",
            "My_Intelli_miniApp"
        ],
        "handler": {
            "component_id": "111111.111111.111111.11111.111111",
            "configuration": {
                "input_fields": {
                    "input_1": "value_1",
                    "input_2": "value_2",
                    "input_3": "value_3"
                }
            }
        }
    }
]

Response (Failed)

JSON
HTTP/1.1 404 NOT_FOUND

The failed status 404 NOT_FOUND can be returned if the group access privileges constraint is violated (the application is under a group to which the user does not have access privileges).

Delete Error Handler

PUT

{{baseUrl}}/orchestrator/api/apps/<app_id>/error-handlers/

To delete an Error Handler, the same PUT request can be used but with different payload.

Click to see the details

To delete an Error Handler, make a PUT request as above with the following payload:

JSON
[{
    "error_types": [],
    "error_sources": [],
    "name": null,
    "handler": {
        "component_id": "",
        "configuration": {}
    }
}]

Response (Failed)

JSON
HTTP/1.1 400 BAD_REQUEST

The following errors may be returned by the API in case of misconfigured Error Handlers:

All the messages below can also appear as warnings on Canvas if a change that causes the corresponding problems is introduced.

  • no default Error Handler has been found:

    Example

    JSON
    {
        "message": "Default Error Handler is missing.",
        "errors": {
            "error_handler_errors": [
                {
                    "type": "WARNING",
                    "code": "NONE_DEFAULT_ERROR_HANDLER",
                    "message": "Default Error Handler is missing.",
                    "location": "error_handlers/"
                }
            ]
        }
    }
  • multiple default Error Handlers:

    Example

    JSON
    {
        "message": "Error Handlers could not be saved because they are invalid. Please fix the issues to continue.",
        "errors": {
            "error_handler_errors": [
                {
                    "type": "WARNING",
                    "code": "MULTIPLE_DEFAULT_ERROR_HANDLERS",
                    "message": "Multiple default Error Handlers have been found. Only one is allowed.",
                    "location": "error_handlers/0"
                },
                {
                    "type": "WARNING",
                    "code": "MULTIPLE_DEFAULT_ERROR_HANDLERS",
                    "message": "Multiple default Error Handlers have been found. Only one is allowed.",
                    "location": "error_handlers/1"
                }
            ]
        }
    }
  • use of an unknown event source:

    Example

    JSON
    {
        "message": "A miniApp has been referenced as Event Source but it no longer exists. Please remove the reference. Field: test_user_id.source_1.Announcement.MiniApps.group (event source).",
        "errors": {
            "error_handler_errors": [
                {
                    "type": "WARNING",
                    "code": "UNKNOWN_EVENT_SOURCE",
                    "message": "A miniApp has been referenced as Event Source but it no longer exists. Please remove the reference.",
                    "field": {
                        "field_type": "event source",
                        "name": "test_user_id.source_1.Announcement.MiniApps.group"
                    },
                    "location": "error_handlers/1"
                }
            ]
        }
    }
  • use of invalid event types:

    Example

    JSON
    {
        "message": "An invalid event type has been specified. Please select one of the available types. Field: does_not_exist (event type).",
        "errors": {
            "repeat_handler_errors": [
                {
                    "type": "WARNING",
                    "code": "INVALID_EVENT_TYPE",
                    "message": "An invalid event type has been specified. Please select one of the available types.",
                    "field": {
                        "field_type": "event type",
                        "name": "does_not_exist"
                    },
                    "location": "repeat_handlers/0"
                }
            ]
        }
    }
  • non-default Error Handler with an empty handler:

    Example

    JSON
    {
        "message": "Only default Error Handler is allowed to have empty handler.",
        "errors": {
            "error_handler_errors": [
                {
                    "type": "WARNING",
                    "code": "INVALID_NON_ERROR_HANDLER",
                    "message": "Only default Error Handler is allowed to have empty handler.",
                    "location": "error_handlers/1"
                }
            ]
        }
    }
  • inexisting Flow used inside an Error Handler:

    Example

    JSON
    {
        "message": "Unknown Flow is referenced at an Error Handler.",
        "errors": {
            "error_handler_errors": [
                {
                    "type": "WARNING",
                    "code": "UNKNOWN_FLOW_ERROR_HANDLER",
                    "message": "Unknown Flow is referenced at an Error Handler.",
                    "location": "error_handlers/1"
                }
            ]
        }
    }
  • Error Handler using Flow from different group than the app's:

    Example

    JSON
    {
        "message": "The handler component's group differs from the app's.",
        "errors": {
            "error_handler_errors": [
                {
                    "type": "WARNING",
                    "code": "INVALID_COMPONENT_GROUP",
                    "message": "The handler component's group differs from the app's.",
                    "location": "error_handlers/1"
                }
            ]
        }
    }
  • use of other type of Handlers instead of a Flow:

    Example

    JSON
    {
        "message": "Error Handlers are only accepting Flows as a handler.",
        "errors": {
            "error_handler_errors": [
                {
                    "type": "WARNING",
                    "code": "INVALID_ERROR_HANDLER_TYPE",
                    "message": "Error Handlers are only accepting Flows as a handler.",
                    "location": "error_handlers/1"
                }
            ]
        }
    }
  • Handler with invalid configuration (input/output fields):

    Example

    JSON
    {
        "message": "Invalid configuration for handler's component.",
        "errors": {
            "error_handler_errors": [
                {
                    "type": "WARNING",
                    "code": "INVALID_COMPONENT_CONFIG",
                    "message": "Invalid configuration for handler's component.",
                    "location": "error_handlers/1"
                }
            ]
        }
    }

Models

Error Handlers

Click to see the details

Name

Type

Description

error_types

array[string]

The list of FailExitReasons (ex. "getMiniAppError", "InfoAsked_NotAvailable", "MaxNoInputs").

error_sources

array[string]

The list of Fields to use as error sources.

handler

Nested Error Handler

The nested handler config.

Error Handler.Handler

Name

Type

Description

component_id

string

The component id of the component that handles the error occurrence (e.g. a Flow or a miniApp).

configuration

object

The input variables for the error handler component.

Example

JSON
[
    {
        "handler": {
            "name": "",
            "nodeType": "",
            "component_id": "",
            "configuration": {
                "input_fields": {},
                "output_fields": []
            }
        },
        "error_types": [],
        "error_sources": []
    },
    {
        "handler": {
            "name": "flow_name",
            "nodeType": "Flow",
            "component_id": "uuid.flow_name.Flows.orc.flowteam",
            "configuration": {
                "input_fields": {},
                "output_fields": []
            }
        },
        "error_types": [
            "AgentRequest",
            "MaxContinuousAgentRequests"
        ],
        "error_sources": [
            "error-sources-here"
        ]
    },
    {
        "error_types": [
            "NoInput",
            "ContinuousNoInputs"
        ],
        "error_sources": [
            "ZipCode",
            "My_Intelli_miniApp"
        ],
        "handler": {
            "component_id": "111111.111111.111111.11111.111111",
            "configuration": {
                "input_fields": {
                    "input_1": "value_1",
                    "input_2": "value_2",
                    "input_3": "value_3"
                }
            }
        }
    }
]
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.