Handling Errors with an Error Flow
The error flow is triggered when certain severe errors occur while processing the flow, or when the error
action is invoked. It is typically used to produce custom error messages or headers, or set the HTTP status. Another example is augmenting the access log with custom log fields.
In your swagger.yaml
, point the top-level property x-flat-error
to a flow file:
In this example, we use error.xml
to format a custom error message:
This will ensure that all errors that trigger the error flow will produce a consistent status, error message and headers.
Triggers
Error triggers are
or the
error
action
See also
Last updated