Errors

In this guide, we will talk about what happens when something goes wrong while you work with the API. Let's look at the rate limit, status codes, and error types you might encounter.


Rate limit

Browserhub API rate limit is set at 50 requests every 10 seconds. You'll get an HTTP 429 Too Many Requests status code when your requests exceed that limit.


Status codes

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

  • Name
    200
    Type
    Description

    It indicates a successful response.

  • Name
    400
    Type
    Description

    It indicates that your request is invalid. It can be the case when you send incomplete steps, etc. You should check your payload.

  • Name
    401
    Type
    Description

    It indicates that you are unauthorized to perform this request. You should check the API key that you send.

  • Name
    403
    Type
    Description

    It indicates that you don't have access to perform this request. Most likely, you have insufficient credits. You should upgrade your plan to continue performing this request.

  • Name
    404
    Type
    Description

    It indicates that you requested something that doesn't exist.

  • Name
    429
    Type
    Description

    It indicates that you performed too many requests. Please refer to the rate limit section for more details.

  • Name
    500
    Type
    Description

    It indicates a server error. You might want to try again later.


Error message

Unsuccessful requests will return their own status code and error message. Here's an example of a request with the wrong API key.

Error response

{
  "message": "You are unauthorized to perform this request."
}