Overview
Defines the Problem Details RFC compliant description of an error in the Serverless Workflow DSL.Error Object
A URI reference that identifies the error type.For cross-compatibility concerns, it is strongly recommended to use Standard Error Types whenever possible.Runtimes MUST ensure that the property has been set when raising or escalating the error.
The status code generated by the origin for this occurrence of the error.For cross-compatibility concerns, it is strongly recommended to use HTTP Status Codes whenever possible.Runtimes MUST ensure that the property has been set when raising or escalating the error.
A JSON Pointer used to reference the component the error originates from.Runtimes MUST set the property when raising or escalating the error. Otherwise ignore.
A short, human-readable summary of the error or a runtime expression.
A human-readable explanation specific to this occurrence of the error or a runtime expression.
Example
Standard Error Types
Standard error types serve the purpose of categorizing errors consistently across different runtimes, facilitating seamless migration from one runtime environment to another.Configuration Error
Configuration error type
Default status code
Validation Error
Validation error type
Default status code
Expression Error
Expression error type
Default status code
Authentication Error
Authentication error type
Default status code
Authorization Error
Authorization error type
Default status code
Timeout Error
Timeout error type
Default status code
Communication Error
Communication error type
Default status code
Runtime Error
Runtime error type
Default status code
The default status code is provided for each error type. The status code that best describes the error should always be used.
Raising Errors
You can intentionally raise errors using theraise task:
Catching Errors
Use thetry task with catch to handle errors gracefully:
Error Filter Properties
A name/value mapping of the attributes filtered errors must define.
The name of the runtime expression variable to save the error as.
A runtime expression used to determine whether or not to catch the filtered error.
A runtime expression used to determine whether or not to catch the filtered error.
The retry policy to use, if any, when catching errors.If a string, must be the name of a retry policy defined in the workflow’s reusable components.
The definition of the task(s) to run when catching an error.