This guide will be removed on April 29, 2022. Please use our new, easier-to-use Toast technical documentation site. All updated content is on the new site.
Toast APIs return a JSON ErrorMessage
object in the
HTTP response to an unsuccessful REST request. The
ErrorMessage
object includes information that describes one
or more errors encountered during the processing of a request.
It contains the following values:
status
-
The HTTP status code.
code
-
Service-specific result code. For example, 10003.
message
-
A brief, user-friendly message that describes the error.
messageKey
-
This value is not used. It is included for future use.
fieldName
-
This value is not used. It is included for future use.
link
-
The URL of a Toast page that provides more information about the error.
requestId
-
The identifier of the HTTP request that generated the error.
developerMessage
-
Optional technical information that might be useful for a developer who is debugging the cause of the error.
errors
-
A list of JSON
ErrorMessage
objects. canRetry
-
This value is not used. It is included for future use.
The following example shows the ErrorMessage
object for
an unsuccessful Toast API REST request.
ErrorMessage object
{ "status": 400, "code": 10025, "message": "Payment amount cannot be empty", "messageKey": null, "fieldName": null, "link": null, "requestId": "2ea769e2-7fcb-4148-ba75-8de77a248h21", "developerMessage": null, "errors": [], "canRetry": null }