error

The error tag generates an error object.

Syntax

This tag has several usage styles, each style resulting in a valid action object.

Block syntax

{% error %}
  {
    "foo": "bar"
  }
{% enderror %}

Tag syntax, single argument

{% error "foobar" %}

Tag syntax, mapped arguments

{% assign details = hash %}
{% assign details["foo"] = "bar" %}

{% error message: "Something went wrong!", details: details %}

Last updated