Structure of error description and error codes
Error description
Each error that occurs while processing a request on the IS side, along with its respective HTTP code, must include also a more detailed description of this error within the response body. Following fields must be specified:
- error_code: integer code of the error
- error_message: a message describing the encountered error (only for debugging tasks and incident investigations)
- details: error details (specification format depends on the error type) This field is optional.
Example of server response:
JSON
{
"error_code": 0,
"error_message": "Unknown server side error occurred",
"details": null
}
Error codes
0 – UNKNOWN. Unknown server error.
1 - NOT ALLOWED. An invalid method was called; usually this error is accompanied with an HTTP response status 405 when an unsupported method is called (e.g. PATCH while the resource only supports GET/POST).
2 - NOT REALIZED. A web service not implemented for the server was called. This error may occur if a server is present according to documentation but has not been implemented as a permanent/temporary solution.
3 - INVALID STRUCTURE. Invalid request structure. Usually this error occurs when a mandatory parameter cannot be found, or the request body was transferred in a wrong format.
4 - INVALID VALUE. Invalid parameter value, eg.: a string was transferred that was alleged to be in UUID format, yet it could not be converted correctly; or a negative paging offset/window limit value was transferred.
5 - INVALID TYPE. Invalid data type for the parameter.
6 - AUTH NOT PROVIDED. Authentication parameters are missing, eg.: there was an attempt to request a resource that requires authorization without transferring a respective token/key/signature in the request headlines.
7 - AUTH INVALID. Invalid authentication parameter values, eg.: authorization parameters were found but no users associated with the transferred data are present in the system.
8 - AUTH EXPIRED. Authentication data have expired. This error may occur when a token with expiration feature is used.
9 - AUTH FORBIDDEN. Current authorized user (client system) is not allowed to access the requested resource. This error may occur at an attempt to request profile of a different client system or when a client system attempts to request data of clients not belonging to this system.
10 - NOT EXIST. Requested resource does not exist (equivalent to HTTP status_code = 404).
11 - EXTERNAL SERVICE. Error of communication with an external IS. This error may occur in case of issues due to interactions with any third party information systems.
12 – DATABASE. Critical database operation error on the server side.