Errors

We use common HTTP status codes included in the response header to indicate success or failure.

Error Codes
CodeDescription
200OK. Successful request.
201OK. Resource created.
400Bad request. Request message data did not pass validation.
401Unauthorised. Not authorised to access requested data.
403Forbidden. Access to requested data is forbidden.
404Not Found. Requested resource does not exist.
408Timeout. Operation timed out.
422Unprocessable entity. Request message data did not pass validation.
429Too Many Requests
500Server error.

Data validation or violation of business rules related errors. Response could contain multiple errors.

Validation Error Example
{
"errors": [
{
"code": "error.route.not.supported",
"message": "This route is not supported",
"arguments": [
"CNY-EUR"
]
}
]
}

Security related errors.

Authentication Error Example
{
"error": "unauthorized",
"error_description": "Full authentication is required to access this resource"
}

An HTTP 429 response status code indicates that the client has sent too many requests in a given time frame. The default thresholds are:

  • 100 requests per second
  • 1000 requests per minute

Handling 429 responses:

  • Implementing a retry mechanism with exponential backoff. For some of the responses we will include a header: Retry-After in seconds, which indicates the minimum time after which the request should be retried
  • Reducing the rate of requests (for example if executing batch requests - limit the number of concurrent http requests)
  • Contact Wise with a request to increase request thresholds
Too Many Requests Example
HTTP/1.1 429 Too Many Requests
Content-Length: 0
Content-Type: application/json
Retry-After: 60

Something went wrong in our side.

System Error Example
{
"timestamp": "2017-02-02T13:07:39.644+0000",
"status": 500,
"error": "Internal Server Error",
"exception": "java.lang.NullPointerException",
"message": "No message available",
"path": "/v1/quotes/0b63b0cb-2041-4bc4-b3fc-1e51a1454a1b/account-requirements"
}