Error Handlers
Get Error Handler(s)
GET | {{baseUrl}}/orchestrator/api/apps/<app_id>/error-handlers/ | Gets the Error Handler(s) by |
---|
URL Parameters
Name | Type | Description | Example |
---|---|---|---|
| uuid | The Application ID that the error handlers belong to. | "9b399774-3a0a-40c1-8a1c-4a124170b6f3" |
Response (Success)
HTTP/1.1 200 OK
Returns the list of Error Handlers.
Example
[
{
"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)
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. |
---|
URL Parameters
Name | Type | Description | Example |
---|---|---|---|
| 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 |
---|---|---|---|---|
| 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 |
| 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 |
| object | - | Component that handles the error occurrence (for example, a Flow or a miniApp). | no |
Example
[
{
"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)
HTTP/1.1 201 CREATED
Returns the list of Error Handlers.
Example
[
{
"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)
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. |
---|
To delete an Error Handler, make a PUT
request as above with the following payload:
[{
"error_types": [],
"error_sources": [],
"name": null,
"handler": {
"component_id": "",
"configuration": {}
}
}]
Response (Failed)
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
Name | Type | Description |
---|---|---|
| array[string] | The list of FailExitReasons (ex. "getMiniAppError", "InfoAsked_NotAvailable", "MaxNoInputs"). |
| array[string] | The list of Fields to use as error sources. |
| Nested Error Handler | The nested handler config. |
Error Handler.Handler
Name | Type | Description |
---|---|---|
| string | The component id of the component that handles the error occurrence (e.g. a Flow or a miniApp). |
| object | The input variables for the error handler component. |
Example
[
{
"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"
}
}
}
}
]