Common Errors and Solutions
This section describes common errors that may be encountered during integration and their respective solutions.
Response Structure
All error responses contain the following fields in JSON format.
| Parameter | Description | Type |
|---|---|---|
code |
Issued credentials for authentication and integration | String |
message |
Issued credentials for authentication and integration | String |
timestamp |
Error timestamp | String |
errors |
Specific error of the response | String[] |
Response 400
400 Bad Request
There is an invalid or missing required parameters of the request. Whether it is a URL parameter, header parameter or data parameter. The problem can be diagnosed based from the defined error(s).
Response Body
{
"code": "ER.01",
"message": "HTTP Request Error",
"timestamp": "2020-02-07 03:55:06.741",
"errors": [
"Missing request header 'Authorization' of type String"
]
}
Solution
Fix the error depending on the details of the error field.
Response 401
401 Unauthorized
The current request is not authorized due to invalid credentials or expired token.
Response Body
{
"code": "ER.02",
"message": "Authentication Error",
"timestamp": "2020-02-07 03:57:27.384",
"errors": [
"Invalid authorization token. Make sure that the token is valid and not altered/modified."
]
}
Solution
Fix the error depending on the details of the error field.
Response 405
405 Method Not Allowed
Incorrect method for the request. If the API is requesting for a ‘POST’ method, do not use ‘GET’ request or vice versa.
Response Body
{
"code": "ER.01",
"message": "HTTP Request Error",
"timestamp": "2020-02-07 04:58:35.611",
"errors": [
"POST method is not supported. Supported method is 'GET'"
]
}
Solution
Fix the error by selecting the appropriate method for the request. If ‘POST’ is required, then use ‘POST’. Use ‘GET’ if ‘GET’ is required.
Response 415
415 Unsupported Media Type
Incorrect ‘Content-Type’ header value. Usually, the system supports ‘application/json’ as its primary content type. Make sure that this header is present and is with the correct value based on specifications.
Response Body
{
"code": "ER.01",
"message": "HTTP Request Error",
"timestamp": "2020-02-07 05:01:02.615",
"errors": [
"text/plain media type is not supported. Supported media type is 'application/json'"
]
}
Solution
Fix the error by selecting the appropriate content type for the request.
Response 422
422 Unprocessable Entity
The current request cannot be processed due to a field error found in payload. Each field should be formatted based from the defined specification.
Response Body
{
"code": "ER.04",
"message": "Validation Error",
"timestamp": "2020-02-07 03:58:48.769",
"errors": [
"accountFName: This field is required."
]
}
Solution
Fix the error depending on the details of the error field.
Response 500
500 Internal Server Error
An internal system error was encountered upon transaction. This may be due to ongoing system maintenance, a system bug, or a system failure.
Response Body
{
"code": "ER.06",
"message": "Internal Error",
"timestamp": "2020-02-07 03:58:48.769",
"errors": [
"Internal system error encountered. Please retry the transaction or contact the administrator"
]
}
Solution
Retry the current transaction. If still failing after several retries, please contact the administrator for the support.