Errors
RocketShipIt will always return an error_message and errors field on every request.
A value in error_message indicates an error occurred with RocketShipIt itself. Also, a value other than 200 will also be present for code.
A value in errors indicates something of note occurred with the shipping carrier. These errors will range in severity indicated by the type field.
Two examples of errors originating from the carrier:
{
"meta": {
"code": 200,
"error_message": ""
},
"data": {
"errors": [
{
"code": "820",
"description": "The destination state/province code has been changed.",
"type": "NOTE"
}
],
...
{
"meta": {
"code": 200,
"error_message": ""
},
"data": {
"errors": [
{
"code": "",
"description": "Invalid Access License number",
"type": "Error"
}
],
"status_code": "",
"status": ""
}
}
RocketShipIt error caused by invalid JSON, here a missing comma after
"carrier": "ups". The message gives the line and column of the problem:
{
"meta": {
"code": 500,
"error_message": "Invalid JSON - invalid character '\"' after object key:value pair (line 3, column 3)"
},
"data": null
}
RocketShipIt errors use the names from your request. Some examples:
| Mistake | error_message |
|---|---|
"weight": "5" in a package |
Invalid JSON - params.packages[0].weight must be a number, got string |
"test": "true" |
Invalid JSON - params.test must be true or false, got string |
"carrier": "fedx" |
unsupported carrier: 'fedx'. Did you mean fedex, fedex-fims, fedex-rest or fedex-freight? |
"action": "getrates" |
unsupported `action` for this shipping carrier. Please change the `action` parameter. Did you mean getallrates? ups-rest supports: ... |
| An action the carrier does not have | unsupported action: veho does not support createpickup. veho supports: addressvalidate, createmanifest, ... |
To check a response for both kinds of error, see Checking for Errors.
See also: Carrier Errors