To facilitate a clear understanding of error codes, this document provides a list of possible error codes, along with additional information about how to resolve them.
HTTP Error Codes
Let's look at the common HTTP errors you can encounter, what they mean, and what you can do to prevent them.
Code | Message | Explanation |
---|---|---|
400 | Bad Request | Incorrect HTTP Request type (e.g. using GET instead of POST) or Invalid Characters |
401 | Unauthorized | This can happen when one or multiple security requirements are not met such as incorrect Token Auth, IP not in the whitelist, invalid JWT, etc. |
403 | Forbidden | Endpoint Disabled (One of the reasons for this could be a past due payment) |
403 | Forbidden - custom trace not found in allowed custom traces | Custom trace code not whitelisted (Submit a ticket here to go through the approval process) |
404 | Not Found | Incorrect URL or Incorrect method |
413 | Content Too Large | Body of the request is too large |
429 | Too Many Requests | The requests per second (RPS) of your requests are higher than your plan allows. Learn more about the 429 errors here |
500 | Internal Server Error | Submit a ticket for the support team to look into this as soon as possible |
503 | Service Unavailable | Submit a ticket for the support team to look into this as soon as possible |
HTTP Error Code Example
The code snippet below is an example of Error Code 429.
HTTP Error Code Example
{
"jsonrpc": "2.0",
"error": {
"code": 429,
"message": "The requests per second (RPS) of your requests are higher than your plan allows."
},
"id": 1
}
Solana RPC Error Codes
When working with Solana, understanding its API error codes is essential for effective troubleshooting and smooth application operation. The section below explains the most common Solana API error codes, offering insights into their meanings and how to handle them.
Code | Message | Explanation |
---|---|---|
-32002 | Transaction simulation failed: Error processing Instruction 4: custom program error: 0x26 [41 log messages] or preflight check error | This is the preflight check error which means that the transaction you're sending has errors, you'll need to double check the params, signature, etc. |
-32002 | Transaction simulation failed: Blockhash not found | That could happen if the blockhash sent in the tx is not known by the validator yet, a retry mechanism is recommended. Checkout our guide to know more. |
-32003 | Transaction signature verification failure | This could be due to an incorrect private key or public key. One or more signatures is invalid. |
-32004 | Block not available for slot x | This error could happen when there's a timeout, a retry mechanism is recommended. |
-32005 | Node is unhealthy Node is behind by xxxx slots | You should not see this error often, but this indicates that the node you're reaching is a bit behind the tip. Use the retry mechanism mentioned above. Refer to this page for more information. |
-32007 | Slot xxxxxx was skipped, or missing due to ledger jump to recent snapshot | This happens when you're requesting a block that does not exist. Please check the Solana Block Explorer to verify that. |
-32009 | Slot xxxxx was skipped, or missing in long-term storage | Refer to this FAQ for a deeper explanation |
-32010 | xxxxxx excluded from account secondary indexes; this RPC method unavailable for key | This error is when you send an unexpected payload or not sending the correct data to the Solana validator. See this page to correctly handle this error |
-32013 | There is a mismatch in the length of the transaction signature | The length of the signature is not expected |
-32014 | The status of the block for the specified slot is not yet available | This can be either the block is still pending or the node did not sync that specific block yet. A retry mechanism is recommended. |
-32015 | Transaction version (0) is not supported by the requesting client. Please try the request again with the following configuration parameter: "maxSupportedTransactionVersion": 0 | Solana added support for new transaction version types through a concept known as Versioned Transactions. Checkout our guide to know more. |
-32016 | Minimum context slot has not been reached | Double-check when your request is required to be resolved at, could be too far in the future. |
-32602 | Invalid params: xxxxx | Double-check the flags/params you've set for the request. Use our Solana docs as a reference |
There are some, less common Solana errors that you may encounter as well. You can read more about them in the official Solana Client Github Repo.
Solana RPC Error Code Example
The code snippet below shows an example of Error Code -32602.
Solana Error Code Example
{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Invalid param: Invalid"
},
"id": 1
}
If you're experiencing other error codes, please let us know by submitting a ticket. We're more than happy to assist 🚀