Error Codes and Messages
1. Credolab Error Codes
HTTP status code | Description |
---|---|
400 | The server cannot or will not process the request due to an apparent client error (for example, some required field is empty) |
401 | You do not have the authentication (either not authenticated at all or authenticated incorrectly); please re-authenticate and try again. |
403 | The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource |
404 | The requested resource could not be found |
405 | A request method is not supported for the requested resource; for example, a GET request on a form that requires data to be presented via POST , or a PUT request on a read-only resource. |
410 | Indicates that the requested resource is no longer available(e.g. dataset file has been deleted from the server) |
415 | The request entity has a media type that the server (or resource) does not support, or the media type is missed. |
500 | A generic error message is given when an unexpected condition is encountered on the service |
503 | Credolab server availability issue |
2. Credolab Error Messages
Credolab informs API clients of both the high-level error class (using the status code) and the finer-grained details of the problem (using HTTP response body with content type: application/problem+json
).
The latest approach is [RFC 7807]-based.
An exception has up to four properties:
Property | Description |
---|---|
Status (integer) | The HTTP status code [RFC 7231] for the exception. |
Title (string) | A short, human-readable summary of the problem type. |
Detail (string) | A human-readable explanation is specific to this occurrence of the problem. |
Type (string) | A URI reference that identifies the problem type. |
Example:
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "subscription_suspended",
"status": 400,
"detail": "Unable to login to the suspended subscription"
}
Credolab API performs validation of data models that are passed as the body parameters, thus responding with 400(Bad request) status code, e.g:
{
"errors": {
"password": [
"Password is required"
],
"userEmail": [
"Email is required"
]
},
"title": "One or more validation errors occurred.",
"status": 400
}
Below is the list of the supported error messages for the API actions provided by credolab.
Account API
Action | Status | Title | Details |
---|---|---|---|
api/account/v1/credoAppLogin | 400 | subscription_suspended | Unable to log in to the suspended subscription |
api/account/v1/credoAppLogin | 400 | auth_key_invalid | The auth key is invalid |
api/account/v1/login | 400 | user_credentials_invalid | The user email or password is invalid |
api/account/v1/login | 400 | subscription_suspended | Unable to log in to the suspended subscription |
api/account/v1/login | 400 | profile_inactive | Your profile is inactive. Please contact your subscription administrator |
Upload API
Action | Status | Title | Details |
---|---|---|---|
api/datasets/v1/upload | 400 | reference_number_invalid | referenceNumber is required field |
api/datasets/v1/upload | 400 | reference_number_invalid | referenceNumber can't start/end with whitespaces |
api/datasets/v1/upload | 400 | reference_number_invalid | referenceNumber has max length of 100 |
api/datasets/v1/upload | 400 | reference_number_invalid | referenceNumber can't contain / |
api/datasets/v1/upload | 400 | reference_number_not_unique | The reference number is not unique |
api/datasets/v1/upload | 400 | real_ip_invalid | clientIp is required |
api/datasets/v1/upload | 400 | data_invalid | data is required |
api/datasets/v1/upload | 400 | data_invalid | Decryption error occured |
api/datasets/v1/upload | 400 | data_invalid | Exception during decompression occured |
api/datasets/v1/upload | 400 | reference_number_expired | Dataset already expired |
DataSets API
Action | Status | Title | Details |
---|---|---|---|
v6.0/datasets/{referenceNumber}/datasetinsight | 404 | reference_number_invalid | The specified dataset does not exist on the server |
v6.0/datasets/{referenceNumber}/datasetinsight | 400 | insights_is_not_configured | Subscription has no insight configured for the dataset requested |
v6.0/datasets/{referenceNumber}/datasetinsight | 400 | reference_number_required | Reference number parameter is empty |
v6.0/datasets/{referenceNumber}/datasetinsight | 410 | dataset_removed | The specified dataset has been removed due to retention policies |
v6.0/datasets/{referenceNumber}/datasetinsight | 400 | state_is_not_complete | Dataset is not in the complete state |
v6.0/datasets/{referenceNumber}/datasetinsight | 400 | state_is_expired | Reference number has expired |
Updated about 1 year ago