Errors
HTTP response codes
Solvimon uses conventional HTTP response codes to indicate the success or failure of an API request.
- Codes in the 2xx range indicate success. Generally, you will get either a
201or200, the former for when a resource is created, the latter when fetching information. - Codes in the 4xx range indicate an error that failed given the information provided. Some 4xx errors that could be handled programmatically include an error code briefly explaining the reported error.
- Codes in the 5xx range indicate an error with Solvimon's servers (these are rare).
Good to knowOur API responses hold a unique request reference in the header field:
X-REQUEST-ID, that holds a value of the following format:reqr_HwDeRw0dFUrJrjCKk31w. It is advised to provide this reference for troubleshooting.
Errors
An error response consists of the following fields:
type: possible values are:API_ERRORandINVALID_REQUEST. The latter will indicate a failure on the request submitted being invalid, the former is where processing failed due to internal issues or other non-recoverable problemscode: programmatic value to indicate what failed, e.g.RESOURCE_NOT_FOUNDorUNABLE_TO_PROCESS_INSTRUCTIONS. Below is a list provided for all the existing codes.field(optional): indicates which field was deemed invalidmessage: a human-readable explanation of the response
An example of such a response would be:
{
"type": "INVALID_REQUEST",
"code": "INVALID_FIELD",
"field": "schedules.0.included_volumes.0.number",
"message": "value required, but not set"
}List of error codes
A list of the existing error codes that can be within the field code.
| Error Code | Description |
|---|---|
| RESOURCE_NOT_FOUND | The requested resource is not found |
| RESOURCES_NOT_FOUND | The requested resources are not found |
| UNABLE_TO_PROCESS_INSTRUCTIONS | The payload of the request can not be processed |
| UNSUPPORTED_MEDIA_TYPE | The Content-Type of the request is not set or is incorrect |
| RESOURCE_ALREADY_EXISTS | There is an existing resource with the provided identifier |
| COULD_NOT_CREATE_RESOURCE | The resource could not be created |
| COULD_NOT_UPDATE_RESOURCE | The resource could not be updated |
| COULD_NOT_DELETE_RESOURCE | The resource could not be deleted |
| MISSING_VERSION | The version in the path is missing |
| UNSUPPORTED_VERSION | The version in the path is not supported |
| MISSING_ID | The id is missing from the path |
| INVALID_ID | The id from the path is not valid |
| MISSING_REFERENCE | The reference is missing from the request |
| MISSING_FIELD | A mandatory field is missing from the request |
| INVALID_FIELD | A field from the request is not valid |
| INTERNAL_ERROR | An internal error has occurred |
| UNAUTHORISED | The credentials provided are invalid |
| USER_NOT_ALLOWED | The user has no permission to make the request |
Updated 9 months ago
What’s Next