Error management
Error management
When an error occures, a HTTP response in the 400 series is returned along with formatted error messages containing an error code, an explaining text and other details on the error.
Error codes
| Code | Description |
|---|---|
| Other | Miscellaneous or unknown problem. |
| DatabaseUnavailable | Database unavailable. |
| BadDatabaseConfiguration | Databaase configuration problem. |
| EntityIdUrlMismatch | Entity Id mismatch between Url and payload. |
| EntityIdEmptyOrNull | Id is empty or null. |
| EntityNotFound | Id not found in database. |
| EntityNotUnique | Id not unique. |
| EntityIdMismatch | Id in database not consistent with expected value. |
| EntityDataValidation | Unable to validate entity. |
| EntityUnknownFieldsValidation | Unable to validate enknown fields in entity. |
| IsDeleted | Entity has status 'deleted' in database. |
| PageSizeOutOfBonds | Value given for page size is out of bounds. |
| PageOutOfBonds | Value given for page is out of bounds. |
| UnableToParseObject | Unable to parse entity/json to the expected entity type. |
| LatitudeOutOfRange | Latitude must be between -90 and 90 degrees inclusive and be expressed with a maximum of 10 characters. |
| LongitudeOutOfRange | Longitude must be between -180 and 180 degrees inclusive and be expressed with a maximum of 10 characters. |
| NoOfBatchItemsExceeded | Too many items in batch request. |
| BatchIdListMismatch | Ids in posted batch job does not match list of processed items. |
| BatchUnableToSend | Unable to post batch message to worker queue. |
| BadMultitenantRequest | Multitenant endpoints require a multitenant agent claim. |
| IllegalTenantValue | Illegal value of tenant identifier. |
| UnknownTenant | The tenant identifier is missing or unknown. |
| TenantDiscovery | Problem discovering tenant. |
| UnableToPostEdi | Unable to post Edi message to Service Bus recipient. |
| BadOrderEventRequest | Order event request is badly formed. |
| OrderEventNoRowsToRemove | Order event requested to remove order rows, but no order rows remain to remove. |
| OrderEventUnableToHandleRow | Unable to handle order event row. |
| AdminJobMsgCleanUpBadDate | Bad date value in job msg clean up. |
| ImportConfigProblem | Import config problem, tenant not configured correctly. |
| ImportConfigNotFound | Import config problem, configuration not found. |
| ImportConfigNotParseable | Import config problem, unable to parse config values. |
| ImportConfigDefaultEntityNotFound | Import config problem, id not found in database. |
| ImportConfigDefaultEntityNotUnique | Import config problem, id not unique. |
| ImportConfigDefaultEntityIdEmptyOrNull | Import config problem, default id is empty or null. |
| UnableToExecutePostOpProcedure | Post op procedure unable to execute. |
Examples
[
{
"errorMessage": "Please provide the same Wholesaler id in request body and in url.",
"errorCode": "EntityIdUrlMismatch",
"additionalInfo": {
"ComparisonValue": "1",
"ComparisonProperty": "Wholesaler Id",
"PropertyName": "Wholesaler Id",
"PropertyValue": "2"
}
}
]
[
{
"errorMessage": "Model validation failure of Wholesaler",
"errorCode": "EntityDataValidation",
"additionalInfo": {
"PropertyProblem 1": "The id must be a number",
"PropertyProblem 2": "Property 'Fax' must not be null."
}
}
]
[
{
"errorMessage": "Please provide a valid JSON Wholesaler request body.",
"errorCode": "EntityNotFound",
"additionalInfo": {
"PropertyName": "Wholesaler",
"PropertyValue": null
}
}
]