Errors
Error Format
All errors will return with the same base format. Look to the right to see an example.
{
"status_code": 401,
"error": {
"minor_code": 4012,
"type": "API Authentication Failure",
"message": "The supplied bearer token has expired. Please obtain a new one.",
"details": {
"bearer_token": "7GimeNYhwD3fs0xoTtLXdZIox53eSttzrRf71ENA"
},
"error_token": "54ae20da-a2d3-47a1-ac29-f9b7569ca652"
},
"timestamp": 1472052254031,
"evaluation_token": null,
"entity_token": null,
"application_token": null,
"application_version_id": null
}
Attribute | Description |
---|---|
status_code | Same as HTTP status code but included for easy access and debugging |
error | The main error object |
error.minor_code | Minor code indicating the exact type of the error. Every type of handled error in the Alloy system gets a unique minor error code. See below for the list of possible minor error codes |
error.type | High level description of error |
error.message | More detailed error message |
error.details | Object possibly containing information to make it easier to debug the cause of the error |
timestamp | Unix timestamp of error |
evaluation_token | Evaluation token for this request if it has been set (otherwise null) |
entity_token | Entity token for this request if it has been set (otherwise null) |
application_token | Application token for this request if it has been set (otherwise null) |
application_version_id | Application version ID for this request if it has been set (otherwise null) |
HTTP code | Minor Code | Description |
---|---|---|
200 | Waiting Data Request- please PATCH the missing params | |
201 | Created - this will be the result of all HTTP POST requests, we just successfully "created" the entity on our system | |
202 | Pending Webhook | |
206 | Partial Response - if the request executed but some upstream services failed to execute, we will return as much data as we can. You can resume this evaluation where it left off by running POST https://sandbox.alloy.co/v1/evaluations/<evaluation_token> | |
400 | 4001 | Bad Request - Header Validation Failure |
400 | 4002 | Bad Request - Request Body Validation Failure |
400 | 4003 | Bad Request - Invalid Request Body |
401 | 4011 | Unauthorized |
401 | 4012 | Unauthorized - Credentials Expired |
401 | 4013 | Unauthorized - API Authentication Failure |
401 | 4014 | Unauthorized - Bearer token refresh unauthorized |
401 | 4015 | Unauthorized - Production mode disabled |
403 | 4031 | Forbidden - Entity token not valid |
403 | 4032 | Forbidden - Environment mismatch - can not switch between sandbox and live |
404 | 4041 | Not Found - Evaluation Not Found |
409 | 4091 | Conflict - Evaluation already resolved |
412 | 4121 | Precondition Failed - App disabled |
418 | 4180 | I'm a teapot |
500 | 5000 | Unhanded Server Error |
500 | 5001 | Unhanded Server Error - Service(s) disabled |
500 | 5002 | Unhanded Server Error - Response body validation failure |
503 | 5031 | Service Unavailable - We're temporarily offline for maintenance. We're probably looking over Peter's shoulder while he configures NGINX. |
Updated 10 months ago