Skip to main content

Errors

HTTP Errors Documentation

This documentation is dedicated to API integrators and provides a detailed explanation of HTTP error codes 401, 403, 404, 429, and 500. These status codes are used by web servers to communicate the status of HTTP requests to clients (such as web browsers or other applications interacting with the APIs).

HTTP Status Code 401 - Unauthorized

Description

The status code 401 indicates that the request has not been applied because it lacks valid authentication credentials for the target resource. This error is returned when the server requires authentication and the credentials provided were not provided or were incorrect.

Common Causes

  • Missing credentials: The request does not include authentication credentials.
  • Invalid credentials: The provided credentials are incorrect or expired.
  • Expired access token: The provided access token has expired and needs to be renewed.

Resolution

  • Verify that the credentials are correct.
  • Ensure to include a valid authentication token in the request.
  • Renew the access token if it has expired.

Response Example

{
"error": "Unauthorized",
"message": "Authentication is required and has failed or has not yet been provided."
}

HTTP Status Code 403 - Forbidden

Description

The status code 403 indicates that the server understood the request but refuses to authorize it. Unlike 401, authentication has been provided but is insufficient to access the resource.

Common Causes

  • Insufficient permissions: The authenticated user does not have the necessary permissions to access the resource.
  • Reserved resources: The requested resource is reserved and not accessible to the current user.

Resolution

  • Verify the permissions associated with the used account.
  • Request access to the resource from the support team if necessary.

Response Example

{
"error": "Forbidden",
"message": "You do not have permission to access this resource."
}

HTTP Status Code 404 - Not Found

Description

The status code 404 indicates that the server cannot find the requested resource. This error is common when the URL is incorrect or the resource does not exist.

Common Causes

  • Incorrect URL: The URL provided in the request is incorrect or poorly formatted.
  • Non-existent resource: The requested resource does not exist on the server.

Resolution

  • Check the URL for typing errors.
  • Ensure that the requested resource exists on the server.

Response Example

{
"error": "Not Found",
"message": "The requested resource could not be found."
}

HTTP Status Code 429 - Too Many Requests

Description

The status code 429 indicates that the user has sent too many requests within a given period of time. It occurs when the [Rate Limit]("Limit & Quotas.md") has been exceeded.

Common Causes

  • Exceeding the speed limit: Too many requests sent in a short period.
  • API abuse: Excessive use of APIs in a way that violates the terms of service.

Resolution

  • Reduce the number of requests sent.
  • Implement an exponential backoff to handle subsequent attempts.
  • Contact the API provider to increase the limits if necessary.

Response Example

{
"error": "Too Many Requests",
"message": "You have sent too many requests in a given amount of time. Please try again later."
}

HTTP Status Code 500 - Internal Server Error

Description

The status code 500 indicates that the server encountered an unexpected internal error that prevented it from fulfilling the request.

Common Causes

  • Server bugs: Errors in the server's code.
  • Configuration issues: Incorrect server configurations.
  • Temporary problems: Temporary malfunctions of the server or infrastructure.

Resolution

  • Check the server logs to identify the error.
  • Fix any bugs in the server code.
  • Verify and correct the server configurations.

Response Example

{
"error": "Internal Server Error",
"message": "The server encountered an internal error and was unable to complete your request."
}