Skip to main content

Errors

Figment uses conventional HTTP response codes to indicate the success or failure of an API request.

In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a staking transaction failed, etc.). Codes in the 5xx range indicate an error with Figment's servers.

HTTP Response 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 exceeded their quota or sent too many requests in a given timeframe, and is subject to rate limiting.
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

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 a 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.