Skip to main content

Raise

Intentionally triggers and propagates errors. By employing the "Raise" task, workflows can deliberately generate error conditions, allowing for explicit error handling and fault management strategies to be implemented.

Properties

NameTypeRequiredDescription
raise.errorerroryesDefines the error to raise.

Example

document:
dsl: 1.0.0
namespace: zigflow
name: example
version: 0.0.1
timeout:
after:
minutes: 1
do:
- wait:
wait:
seconds: 1
- bug:
raise:
error:
type: https://serverlessworkflow.io/spec/1.0.0/errors/communication
status: 400

Error

Defines the Problem Details RFC compliant description of an error.

Properties

PropertyTypeRequiredDescription
typeuri-templateyesA 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.
statusintegeryesThe 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.
instancestringnoA JSON Pointer used to reference the component the error originates from.
Runtimes MUST set the property when raising or escalating the error. Otherwise ignore.
titlestringnoA short, human-readable summary of the error or a runtime expression
detailstringnoA human-readable explanation specific to this occurrence of the error or a runtime expression

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.

TypeStatus¹Description
https://serverlessworkflow.io/spec/1.0.0/errors/configuration400Errors resulting from incorrect or invalid configuration settings, such as missing or misconfigured environment variables, incorrect parameter values, or configuration file errors.
https://serverlessworkflow.io/spec/1.0.0/errors/validation400Errors arising from validation processes, such as validation of input data, schema validation failures, or validation constraints not being met. These errors indicate that the provided data or configuration does not adhere to the expected format or requirements specified by the workflow.
https://serverlessworkflow.io/spec/1.0.0/errors/expression400Errors occurring during the evaluation of runtime expressions, such as invalid syntax or unsupported operations.
https://serverlessworkflow.io/spec/1.0.0/errors/authentication401Errors related to authentication failures.
https://serverlessworkflow.io/spec/1.0.0/errors/authorization403Errors related to unauthorized access attempts or insufficient permissions to perform certain actions within the workflow.
https://serverlessworkflow.io/spec/1.0.0/errors/timeout408Errors caused by timeouts during the execution of tasks or during interactions with external services.
https://serverlessworkflow.io/spec/1.0.0/errors/communication500Errors encountered while communicating with external services, including network errors, service unavailable, or invalid responses.
https://serverlessworkflow.io/spec/1.0.0/errors/runtime500Errors occurring during the runtime execution of a workflow, including unexpected exceptions, errors related to resource allocation, or failures in handling workflow tasks. These errors typically occur during the actual execution of workflow components and may require runtime-specific handling and resolution strategies.

¹ Default value. The status code that best describes the error should always be used.