Skip to main content
Skip table of contents

Error Handlers

Get Error Handler(s)

GET /api/apps/<app_id>/error-handlers/

URL params

Name

Type

Description

Example

app_id

uuid

the Application ID that the error handlers belong to

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

Successful status: 200 OK

Return 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"
                }
            }
        }
    }
]

Failed status: 404 NOT_FOUND

Create/Update Error Handlers

Creating and Updating Error Handlers happens through the same PUT request by updating the list of Error Handlers.

PUT /api/apps/<app_id>/error-handlers/

URL params

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. NOTE: 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. NOTE: 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"
                }
            }
        }
    }
]

Successful status: 200 CREATED

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"
                }
            }
        }
    }
]

Failed status: 404 NOT_FOUND

  • when 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

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

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

Failed status: 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 save if a change is introduced that causes the corresponding problems.

  • 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 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 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 other type of Handler 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

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.