Errors

Learn how to handle PandaScore REST API errors.

PandaScore uses HTTP response status codes to indicate the failure or success of your requests. When a request fails, PandaScore returns an appropriate error code.

The status codes fall under three categories:

  • 200 success — the request worked as expected
  • 4xx error — the request failed because of the provided parameters
  • 5xx error — the request failed because of an error on PandaScore' servers

Client errors

Status codes within the 4xx range refer to client errors. They occur when something is wrong with the request. Consequently, most of these errors should only happen to you during development phase.

HTTP StatusDefinition
400 — Bad RequestMalformed request. Most likely a syntax error with the query parameters.
401 — UnauthorizedMissing token. See Authentication.
403 — ForbiddenRequested URL is not available with your plan. See Coverage.
404 — Not FoundResource does not exist.
429 — Too Many RequestsYou've reached your plan's rate limit.

In case of client errors, PandaScore sends a JSON response that provides information on the error. It contains the following attributes:

  • error: is a unique identifier for the error
  • message: is a human-readable message that can be displayed to your users or output to your logs

Example

HTTP Status: 404

{
  "error": "Not Found",
  "message": "The resource does not exist."
}

Server errors

Status codes within the 5xx range refer to server errors. These only happen because of issues on PandaScore's servers and should be rare.

If a request fails with a 5xx status, you should give it another go. API downtimes are often short, so there is a good chance that the request succeeds the next time. If the problem persists, check our status page or contact our support.