Exceptions

Commerce API returns exceptions in the HTTP response body when something goes wrong. The format of the message is application/problem+json media type and the response body will contain the following members:

An exception has the following properties:

PropertyDescription
typeA URI that identifies the problem detail type
titleA short human-readable summary about the problem
statusThe HTTP status code for the exception.
detailA human-readable explanation about the problem
instanceA reference code that identifies the specific occurrence of the problem

Exception example

{
    "type": "https://docs.progleasing.com/errors#error221"
    "title":""
    "status":"403"
    "detail":""
    "instance":""
}

A Model Validation exception has the following properties:

PropertyDescription
errorsAn array of errors encountered. Each error present contains s field title and the validation error or errors associated with that field.
titleA short human-readable summary about the problem
statusThe HTTP status code for the exception.
traceIdA reference code that identifies the specific occurrence of the problem

Model Validation Exception example

{
   "errors":{
      "To":[
         "The 'To' field is required."
      ],
      "From":[
         "The 'From' field is required."
      ]
   },
   "title":"Field Validation Error",
   "status":"403",
   "traceId":"7384833-9003-ff00-b63f-7374889300ff"
}