Errors and status codes

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

You can tell if your request was successful by checking the status code when receiving an API response. If a response comes back unsuccessful, you can use the error type and error message to figure out what has gone wrong and do some rudimentary debugging.


Categories

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

  • Name
    2xx
    Type
    Description

    A 2xx status code indicates a successful response.

  • Name
    4xx
    Type
    Description

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

  • Name
    5xx
    Type
    Description

    A 5xx status code indicates a server error — you shouldn't be seeing these.


Status codes

  • Name
    200 OK
    Type
    Description

    The request has succeeded for GET, PUT, PATCH and DELETE requests.

  • Name
    201 Created
    Type
    Description

    The request has succeeded for POST requests.

  • Name
    400 Bad Request
    Type
    Description

    The API could not understand the request. There is probably something wrong with the data format. Each endpoint has its own guidelines.

  • Name
    401 Unauthorized
    Type
    Description

    An error with Google account authentication or you have entered an incorrect Barer token / Basic Auth credentials.

  • Name
    402 Payment Required
    Type
    Description

    Payment is required to process the request. Occurs when you try to make a request that requires a higher plan.

  • Name
    403 Forbidden
    Type
    Description

    Action is forbidden.

  • Name
    404 Not Found
    Type
    Description

    The server did not find anything matching the request.

  • Name
    429 Too Many Requests
    Type
    Description

    You have exceeded the request limit. Learn more about the different types of request limits in SheetDB here.

  • Name
    500 Internal Server Error
    Type
    Description

    We had a problem. Try again later.

  • Name
    1015 Rate limit
    Type
    Description

    You are making too much requests, the limit is 60 requests per 10 seconds. Try again in a minute.