Skip to main content

Response Codes & Error Codes

A quick reference for the standard HTTP response status codes and JSON-RPC error codes which you may encounter during the development process.

HTTP Response Status Codes

info

HTTP status codes are three-digit responses from a server to a client request.

These status codes are grouped into 5 different categories:

  1. 1xx - Informational Responses

  2. 2xx - Successful Responses

  3. 3xx - Redirection Messages

  4. 4xx - Client Error Responses

  5. 5xx - Server Error Responses

Common HTTP Status Codes

CodeMessageMeaning
200OKThe request succeeded.
400Bad RequestThe server cannot or will not process the request due to some client error like incorrect request syntax.
401UnauthorizedThe client must authenticate itself to get the request response, this can occur due to an incorrect API Key or Auth token.
403ForbiddenThe client doesn't have access rights to the content/service.
404Not FoundThe server can not find the requested resource. Coming from an API, it can also mean that the endpoint is correct but the requested resource doesn't exist.
405Method Not AllowedThe request method is known by the server but is not supported by the target resource.
408Request TimeoutA timeout means the server shut down the connection.
429Too Many RequestsThe user has sent too many requests in a given amount of time ("rate limiting"). Read more about it in the Quotas and Rate Limits section.
500Internal Server ErrorThe server has encountered a situation it does not know how to handle.
501Not ImplementedThe request method is not supported by the server and cannot be handled.
502Bad GatewayThis error response means that the server, while acting as a gateway, tried to handle the request and got an invalid response.
503Service UnavailableThe server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded.
504Gateway TimeoutThis error response is given when the server is acting as a gateway and cannot get a response in time.

JSON-RPC Error Codes

info

When you make a request to a server like DataHub, the server will process your request to send back the expected response/result but in case the request does not succeed, the server will send back a response with error result fields.

Error result fields will contain the following information:

  1. code - A Number that indicates the error type that occurred, (ex. -32600).

  2. message - A String providing a short description of the error.

  3. data - A Primitive or Structured value that contains additional information about the error. This may be omitted.

Common JSON-RPC Error Codes

For more details about the JSON-RPC error codes and full reference, please see the official JSON-RPC docs

CodeMessageMeaning
-32700Parse errorInvalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
-32600Invalid RequestThe JSON sent is not a valid Request object.
-32601Method not foundThe method does not exist / is not available.
-32602Invalid paramsInvalid method parameter(s).
-32603Internal errorInternal JSON-RPC error.
-32000 to -32099Server errorReserved for implementation-defined server-errors.

Quotas and Rate Limits

Quotas

  • A Quota measures how many total requests you can make across all your services in one day.
  • If you go over your Quota for the day, you'll need to upgrade your plan.
  • The goal of a Quota is to allow customers to pay for what they use, similar to a cell phone plan.

Rate Limits

  • A Rate Limit measures how many requests you can make against a specific endpoint in 1 second.
  • If you hit a Rate Limit for an endpoint, you'll need to retry your requests.
  • The goal of a Rate Limit is to ensure quality of service, and most users will never come close to hitting a Rate Limit.

How Do I Know If I've Hit My Quota?

DataHub will return status code HTTP 429 "Too Many Requests" when you exceed your Quota. To confirm this, you can view your current Quota usage on your DataHub Dashboard.

You can upgrade your plan to increase your Quota.

How Do I Know If I'm Being Rate Limited?

DataHub will return status code HTTP 429 "Too Many Requests" when you are getting rate limited for a specific endpoint.

If this happens, you can confirm on your DataHub Dashboard that you are not over your Quota and that you are instead getting rate limited.

If you are getting rate limited, you will need to retry your requests in your application. Since Rate Limits are measured per second, you could simply wait a few seconds and try again.