Errors

In this guide, we will discuss what happens when you encounter issues while working with the API. Mistakes are a natural part of the process, and we all make them. Let's explore some status codes and error types you might come across.

You can determine if your request was successful by checking the status code in the API response. If the response indicates an error, you can use the error type and message to understand what went wrong and perform some initial troubleshooting before reaching out for support.


Status codes

Here is a list of the different categories of status codes returned by the Protocol API. Use these to understand if a request was successful.

  • Name
    2xx
    Description

    A 2xx status code indicates a successful response.

  • Name
    4xx
    Description

    A 4xx status code indicates a client error — this means it's a you problem.

  • Name
    5xx
    Description

    A 5xx status code indicates a server error — make sure to tag @rdpascua in your emails.


Error types

Whenever a request is unsuccessful, the Polaris API will return an error response with an error type and message. You can use this information to understand better what has gone wrong and how to fix it. Most of the error messages are pretty helpful and actionable.

Here is a list of error types supported by the Polaris API.

  • Name
    account_id_invalid
    Description

    The account id that you are trying to use is invalid.

  • Name
    authentication_error
    Description

    Invalid access token provided.

  • Name
    permission_error
    Description

    You do not have permission to perform this action

Error response

{
  "type": "account_id_invalid",
  "message": "The account id that you are trying to use is invalid",
  "documentation_url": "https://docs.polaris.revlv.com/errors/account_id_invalid"
}

Was this page helpful?