Error objects

When a task renders an error object, the task run will be marked as failed, and no rendered action runs will be performed. This is a good way to communicate an intentional failure to the user, when your Liquid code detects a certain condition.

A task that renders an error object during preview will interrupt the preview, and visibly communicate the error to the user. This makes error objects a useful way to validate task options.

An error object is a plain JSON object, having the following structure:

{
  "error": ERROR_DETAILS
}

The error details can be any JSON value. This value will be represented to the user as the reason for the task failing.

Error objects are most easily generated using the error tag.

Last updated

Was this helpful?