# On Error Object
on_error defines pointers to the next operation that will be execute in case of an error in the current running operation.
# selector
- Type:
object - Required
- Must have the following two attribtues:
type(string) anddata(obejct). typecan hold two types of strings -workflowandoperation. In case the type isoperation, it means that the next attribute in data object indicates operation, in case the type is workflow, it means that next attribute in data object is workflow.datacan hold:workflow- Determines which workflow we are currently runningnext- Pointer to the key of the next workflow/operationrematch(optional) - In case the operation points to another workflow, we can set this flag to true - thus causing the match function to run again and determine which workflow should run.
# type
Defines the next object type.
# data
Defined as a pointer to the next operation.
# For example:
For this on error configuration:
on_error:
selector:
- type: operation
data:
workflow: example-workflow
next: send_error_message_to_user
The next operation need to be execute in case of an error in the current operation, is send_error_message_to_user operation for workflow example-workflow.