Chainnodes RPC Error Codes Explained
Scroll to see all CHAINNODES API error codes below
In the context of this document we define the following phrases:
OFTEN
-> we are emitting this error often, most likely due to a client mistake of using our APIs wronglySOMETIMES
-> can happen because of client or server errors, but still mostly due to mistakenly using our APIs the way they are not supposed to be usedRARELY
-> happens nearly never because usage is obvious enough and only malicious actors would make this wrongVERY RARELY
-> server only errors which happen extremely rarely and shouldn't be expected in normal day to day activities
All of that can vary depending on your usage. If you obey rules and know the APIs, most of the errors won't ever happen. The percentages are averages on Chainnodes based on what we know.
Depending on your plan, you might have a 99.9% SLA guarantee. Error codes that are expected errors, as defined in the table below, do not count towards downtime.
As our API is based on the JSON-RPC spec (opens in a new tab), the error codes and messages received from our servers will always be formatted in the following format:
{
"jsonrpc": "2.0",
"error": {
"message": "invalid api key",
"code": 401
},
"id": 1
}
Alternatively, we sometimes use the optional error.data
object to provide additional details. Do not depend on this value
in your code, but rather use it to debug manually if you receive unexpected errors. Also provide it if you request support
in our public channels our via email. ☝️
If you receive a malformed response or a different format response, most likely it's a server error. You can message us about that on Telegram (opens in a new tab) or via Email Support. This should happen VERY RARELY.
Please do not contact us about "expected" errors unless you do not understand what's going on or think the error is wrong. Otherwise we can only repeat what's written in the table below.
Below is a list of error codes and messages Chainnodes API typically respond with and what they mean.
- Error Code is the JSON-RPC Error Code returned
- HTTP Status is the status code we return, which only applies to HTTP calls (not Websocket).
- 'Client' means you can fix it by fixing your request. / 'Server' means it's an issue out of your direct control.
Error Name | Error Code | Error Message | HTTP Status | Expected? | Client/Server | Description | Rarity |
---|---|---|---|---|---|---|---|
InvalidApiKey | 401 | invalid api key | 401 | YES | CLIENT | provide your correct api key | OFTEN |
UnknownMethod | -32601 | the method $method does not exist/is not available | 200 | YES | CLIENT | use a supported method | SOMETIMES |
UnknownSubscription | -32601 | $subscription subscription does not exist/is not available | 200 | YES | CLIENT | use a supported subscription method | SOMETIMES |
UnknownNetwork | 404 | unknown or unsupported network $network | 200 | YES | CLIENT | use a supported network/chain | SOMETIMES |
InvalidJson | -32700 | not a valid json | 200 | YES | CLIENT | your json is broken | RARELY |
InvalidJsonRPC | -32600 | not a valid json rpc request | 200 | YES | CLIENT | your json doesn't follow json-rpc specs | RARELY |
GenericServerError | -32000 | server error | 200 | NO | SERVER | server error that should recover automatically. try again. | VERY RARELY |
TimeoutError | 408 | request timed out | 200 | YES/NO | SERVER | your query is too heavy and the timeout was reached. reduce query size | RARELY |
NonUniqueIdsInBatch | -32600 | ids in batch not unique | 200 | YES | CLIENT | make sure your batch has unique ids for all requests | SOMETIMES |
NonArrayArgs | -32602 | non-array args | 200 | YES | CLIENT | parameters of json-rpc need to be passed as an array | SOMETIMES |
WsOnly | 406 | only supported on websocket/duplex connections | 200 | YES | CLIENT | send only through websocket, not http | OFTEN |
MissingParam | -32602 | missing value for required argument $position | 200 | YES | CLIENT | some parameter was not provided. please provide | OFTEN |
InvalidLogsFilter | -32600 | invalid logs filter | 200 | YES | CLIENT | your logs filter is broken. fix it | OFTEN |
InvalidArgument | -32602 | invalid argument $position | 200 | YES | CLIENT | one of your parameters is the wrong type | OFTEN |
EthGetLogsTooManyBlocks | -32605 | query requests $num blocks but max is $num2 | 200 | YES | CLIENT | query less blocks at the same time in eth_getLogs | SOMETIMES |
BatchTooBig | -32606 | Batch size too big. | 200 | YES | CLIENT | reduce your batch size (number of requests in the batch) | RARELY |
MonthlyRateLimit | -32610 | monthly rate limit exceeded | 429 | YES | CLIENT | upgrade your plan to continue. don't send further requests before you do. | SOMETIMES |
PerSecondRateLimit | 429 | per second rate limit exceeded | 429 | YES | CLIENT | reduce your requests per second and back off for the given seconds or upgrade your plan, otherwise you will be banned even longer | RARELY |
TooManyWebsocketConnections | 429 | too many websocket connections | 200 | YES | CLIENT | close some websocket connections or upgrade your plan, otherwise we will force close random websocket connections of yours | RARELY |