Errors

Whenever any of the requests fail for some reason, the response will contain a JSON object describing the error class, the request and a message explaining the error.

In addition to that, we use HTTP statuses to indicate the source of the error. As a rule, 2xx HTTP statuses indicate that the request has been successful, 4xx point to an error in the request (incomplete data was sent to the server, the authentication failed, etc.) and 5xx indicate an error within our services.

Here’s an example of a request accessing all the accounts for a non-existing login:

curl -v -H "Accept: application/json" \
        -H "Content-type: application/json" \
        -H "Client-id: CLIENT_ID" \
        -H "Service-secret: SERVICE_SECRET" \
        -X GET \
        https://www.saltedge.com/api/v3/accounts?login_id=20

The application will receive an error response that looks similar to the following:

{
  "error_class": "LoginNotFound",
  "error_message": "Login with id: '20' was not found.",
  "request": {
    "login_id": 20
  }
}

For a complete list of possible errors, consult the Errors reference.