Sync error objects
Understand sync error objects.
When Commerce API detects a synchronous error, it returns an errors
object in the response. This object will return the code, subcode, description, and message.
{
"errors": [
{
"code": "invalid-request",
"subcode": "invalid-task-status",
"description": null,
"message": "The value(s):[ABC, DEF] of taskStatus is invalid, expected value(s) is:[COMPLETED, FAILED, PROCESSING, PUBLISHED]"
},
{
"code": "invalid-request",
"subcode": "startingAfter-and-endingBefore-cannot-be-both-provided",
"description": null,
"message": "[startingAfter] and [endingBefore] can not both be provided."
}
]
}
Last updated
Was this helpful?