Error handling
Get actionable visibility into event, task, and action errors
Last updated
Was this helpful?
Was this helpful?
{
"message": "Received a Shopify error (resource invalid): Add at least 1 product",
"event": {
"id": "ebaa2ab5-fc48-4a5e-8591-11111",
"topic": "mechanic/user/trigger",
"source": "user",
"created_at": "2023-06-13T17:03:27.244Z",
"webhook_request_id": null,
"flow_action_run_id": null,
"run": {
"id": "2a0af1ac-3931-4478-abc7-11111",
"result": null,
"result_meta": {
"shopify_admin_api_time_ms": 0,
"shopify_admin_graphql_api_cost": 0,
"shopify_admin_rest_api_requests_count": 0,
"shopify_admin_graphql_api_requests_count": 0
},
"error": null,
"ok": true,
"started_at": "2023-06-13T17:03:39.118Z",
"stopped_at": "2023-06-13T17:03:39.126Z",
"elapsed_time_ms": 7,
"run_at": "2023-06-13T17:03:27.249Z",
"enqueued_at": "2023-06-13T17:03:27.410Z",
"attempts": 1
}
},
"task": {
"id": "1250304e-313c-49a2-acc2-111111",
"name": "Test Draft order",
"event_topics": [
"mechanic/user/trigger",
"mechanic/actions/perform"
],
"options": {},
"script": "{% raw %}
{% if event.topic == \"mechanic/user/trigger\" or event.preview %} \n {% action \"shopify\" %}\n [\n \"create\",\n \"draft_order\",\n {\n \"customer\": {\n \"id\": 1111\n },\n \"line_items\": []\n }\n ]\n{% endaction %}\n\n{% else %}\n\n{% action \"echo\" action.result %}\n \n{% endif %}
{% endraw %}\n",
"created_at": "2023-06-13T16:50:28.950Z",
"updated_at": "2023-06-13T17:03:22.946Z",
"subscriptions": [
"mechanic/user/trigger",
"mechanic/actions/perform"
],
"enabled": true,
"online_store_javascript": null,
"order_status_javascript": null,
"docs": null,
"shopify_access_scopes_required": [
"write_draft_orders"
],
"subscriptions_template": "mechanic/user/trigger\nmechanic/actions/perform",
"shopify_api_version": "2023-04",
"liquid_profiling": false,
"perform_action_runs_in_sequence": false,
"halt_action_run_sequence_on_error": false,
"run": {
"id": "292a750b-2687-498f-8616-1223",
"error": null,
"ok": true,
"started_at": "2023-06-13T17:03:49.284Z",
"stopped_at": "2023-06-13T17:03:49.291Z",
"elapsed_time_ms": 6,
"run_at": "2023-06-13T17:03:39.125Z",
"enqueued_at": "2023-06-13T17:03:39.286Z",
"result_meta": {
"shopify_admin_api_time_ms": 0,
"shopify_admin_graphql_api_cost": 0,
"shopify_admin_rest_api_requests_count": 0,
"shopify_admin_graphql_api_requests_count": 0
},
"attempts": 1
}
},
"action": {
"type": "shopify",
"options": [
"create",
"draft_order",
{
"customer": {
"id": 12344
},
"line_items": []
}
],
"meta": null,
"run": {
"id": "d60820a4-d9d0-43a8-a56e-11111",
"result": null,
"error": "Received a Shopify error (resource invalid): Add at least 1 product",
"ok": false,
"started_at": "2023-06-13T17:03:56.770Z",
"stopped_at": "2023-06-13T17:03:57.075Z",
"elapsed_time_ms": 304,
"run_at": "2023-06-13T17:03:49.289Z",
"enqueued_at": "2023-06-13T17:03:49.513Z",
"result_meta": {
"shopify_admin_graphql_api_cost": 0,
"shopify_admin_graphql_api_requests_count": 0,
"shopify_admin_rest_api_requests_count": 1,
"shopify_admin_api_time_ms": 295.04
},
"attempts": 1
}
}
}