
Failure function is executed automatically when worklow run fails
failureFunction using context.
The context provided here is only meant to expose workflow run properties (like URL, payload, and headers).
Think of the failure function as an individual context.run step. It executes once with the provided context but cannot define further steps.
If you use a custom authorization method to secure your workflow endpoint, add authorization to the
failureFunction too.
Otherwise, anyone could invoke your failure function with a request.Read more here: securing your workflow endpoint.Parameters
ThefailureFunction receives an object with the following parameters:
The workflow context object containing:
The HTTP status code returned by the failed workflow step.
The response body returned by the failed workflow step.
The response headers returned by the failed workflow step.