Skip to main content

Error reference

This guide explains the various HTTP status codes and API-specific error responses, helping developers troubleshoot and handle errors effectively while integrating with Blast's blockchain services.

Blast supports two classes of APIs:

  • JSON-RPC API
  • Elrond REST API

Each of them has its own error response format.

Additionally, the JSON-RPC API can be queried via WebSockets, while the Elrond API does not expose this kind of endpoint.

When queried via HTTP both APIs return a status code and an API-specific JSON body.

warning

The JSON-RPC API returns the same Error object on both HTTP and WebSocket endpoints.

HTTP Status Codes ​

CodeAPIDescription
400JSON-RPCBad Request - Either invalid JSON-RPC body or requesting resources not available (i.e. method not on the whitelist).
401AllUnauthorized - Request is not authenticated (the project ID is not valid or the network requested is not included in this project).
403AllForbidden - Exceeded capacity of API calls included in the current plan.
429AllToo Many Requests - Reached limit of concurrent API calls allowed per second.
500AllInternal issue while processing the request.

JSON-RPC Error Codes​

CodeMessageDescriptionHTTP Status Code
-32700Parse errorInvalid JSON.400
-32603Internal errorInternal issue.500
-32602Invalid paramsInvalid method parameters.400
-32601Method not foundThe method does not exist / is not available.400
-32600Invalid request

The JSON sent is not a valid Request object.

In case of a batch request, if any of its sub-requests is invalid then the entire batch is invalidated.

400
-32099Authentication failedThe request is not authenticated.401
-32098Capacity exceededExceeded capacity of API calls.403
-32097Rate limit reachedReached limit of concurrent API calls allowed per second.429

Custom Elrond Error Codes​

CodeErrorHTTP Status Code
“unauthorized““authentication failed“401
“forbidden““capacity exceeded“403
“rate_limited““rate limit reached“429

Example Error Responses​

Batch request invalidated (JSON-RPC API)​

[
{
"jsonrpc": "2.0",
"id": 2,
"error": {
"code": -32600,
"message": "Invalid Request",
"data": {
"method": "'eth_signTransaction' is not allowed"
}
}
},
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32600,
"message": "Invalid Request",
"data": {
"message": "Cancelled due to validation errors in bulk request"
}
}
},
{
"jsonrpc": "2.0",
"id": 3,
"error": {
"code": -32600,
"message": "Invalid Request",
"data": {
"message": "Cancelled due to validation errors in bulk request"
}
}
}
]

Authentication failed​

JSON-RPC API

{
"jsonrpc": "2.0",
"id": null,
"error": {
"code": -32099,
"message": "Authentication failed"
}
}

Elrond API

{
"data": null,
"error": "authentication failed",
"code": "unauthorized"
}

Capacity exceeded​

JSON-RPC API

{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32098,
"message": "Capacity exceeded"
}
}

Elrond API

{
"data": null,
"error": "capacity exceeded",
"code": "forbidden"
}

Rate limit​

JSON-RPC API

{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32097,
"message": "Rate limit reached"
}
}

Elrond API

{
"data": null,
"error": "rate limit reached",
"code": "rate_limited"
}