Learn about the standard JSON-RPC error codes
HTTP Status Codes
In addition to the standard The Open Network JSON-RPC error codes, TONX API will return the following status codes for HTTP requests:
Code | Description |
---|---|
200 | OK -- the request is successfully |
400 | Bad Request -- Your request is invalid. Double-check your JSON-RPC body. |
401 | Unauthorized -- You must authenticate your request with an API key. |
403 | Forbidden -- You've use wrong key to query specific network(using testent key to query mainnet data) |
429 | Too Many Requests -- You've exceeded your concurrent requests capacity. |
500 | internal Server Error -- We're unable to process your request right now. Get in touch with us if you see this. |
503 | Service unavailable -- unable to complete the request due to server issues |
JSON-RPC Error Codes
Code | Possible Return Message | Description |
---|---|---|
-32000 | Server error | Reserved for implementation-defined server-errors. See hint below. |
-32001 | Data not found | Please note: TONX API (beta) queries data only for the last 1 days. |
-32002 | The bag of cells format is incorrect or corrupted. | The bag of cells format is incorrect or corrupted. |
-32003 | Transaction not found. | Please verify that the request parameters are correct and try again. |
-32007 | Invitation code expired | Invitation code expired |
-32600 | Invalid Request | The JSON sent is not a valid Request object. |
-32601 | Method not found | The method does not exist / is not available. |
-32602 | Invalid parameter | Invalid method parameter(s). |
-32603 | Internal error | Internal JSON-RPC error. |
-32700 | Parse error | Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. |
-40011 | Too Many Requests | You've exceeded your concurrent requests capacity. |
NOTE:
-32000 is used for general server errors
"resource not found case"
-32600 is used for many errors about the authentication failed
"no api key case"
"api key not found case"
"inconsistent network case"
"missing columns of JSON-RPC standard"
-32603 is used for several errors
"fallback"
"internal error case"
Example Response
{
"jsonrpc":"2.0",
"error":{
"code":-32000,
"message": "Interal Error"
},
"id":1
}