Mechanic
π§βπ» Get Mechanic!
π§βπ§ Task library
π³ Task requests
π¦Ύ Mechanic.dev
Searchβ¦
Introduction
π―
status.mechanic.dev
π
"I need something custom!"
π€
Hire a Mechanic developer
Resources
π§π»
Task library
π
Slack community
π€
Partner directory
Tutorials
Core Concepts
Events
Tasks
Actions
Runs
Interacting with Shopify
Platform
π
Policies
Cache
Email
Events
GraphQL
Integrations
Liquid
Basics
Filters
Keyword literals
Mechanic objects
REST Admin API
Mechanic tags
action
assign
error
log
Liquid console
Shopify
Webhooks
Techniques
Writing a high-quality task
Tagging Shopify resources
Debouncing events
Responding to action results
Working with external APIs
Finding a resource ID
Migrating templates from Shopify to Mechanic
Securing Mechanic webhooks
Monitoring Mechanic
FAQ
Powered By
GitBook
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
Liquid
JSON
1
{
%
error
%
}
2
{
3
"foo"
:
"bar"
4
}
5
{
%
enderror
%
}
Copied!
1
{
2
"error"
:
{
3
"foo"
:
"bar"
4
}
5
}
Copied!
Tag syntax, single argument
Liquid
JSON
1
{
%
error
"foobar"
%
}
Copied!
1
{
2
"error"
:
"foobar"
3
}
Copied!
Tag syntax, mapped arguments
Liquid
JSON
1
{
%
assign details
=
hash
%
}
2
{
%
assign details
[
"foo"
]
=
"bar"
%
}
3
β
4
{
%
error message
:
"Something went wrong!"
,
details
:
details
%
}
Copied!
1
{
2
"error"
:
{
3
"message"
:
"Something went wrong!"
,
4
"details"
:
{
5
"foo"
:
"bar"
6
}
7
}
8
}
Copied!
Previous
assign
Next
log
Last modified
1yr ago
Copy link
Edit on GitHub
Contents
Syntax
Block syntax
Tag syntax, single argument
Tag syntax, mapped arguments