❌ Errors

Errors can be returned from calling any method or in the middle of a subscription. The id param is always returned when possible to make it possible to associate the error with the call. There are exceptions to this such as parse error.

Please Note:
Its a good idea to build in logic to reconnect to the websocket in case of connection failure.

Response Fields

  • code

    signed integer
    The error code as a signed integer. These mostly follow the jsonrpc spec.
    Values
    -32700 Parse error
    -32600 Invalid request
    -32601 Method not found
    -32602 Invalid params
    -32603 Internal error
    -32000 Subscribe error
    -32001 Limit error - When you exceed the subscription limits
  • message

    string
    A more detailed message about the error.

Internal Buffer Overflow Error

You may receive this error if you aren't processing the events fast enough. Usually you will notice long before this happens as your event latency (time behind chain) will build up over 60 seconds. You have a few options to resolve this error:

  1. Ensure your code can process the messages faster.
  2. Reduce the amount of data you receive by providing a filter on the subscribe request.
  3. Pass the allowDrops param (boolean) as true to the subscription. Under normal operation, messages are not deleted or dropped in your stream, however setting this will allow them to be dropped so you can retain a the subscription.

Error Examples

{
    "id": 1,
    "result": null,
    "error": {
        "code": -32000,
        "message": "Message limit reached for endpoint newPair. Please upgrade for unlimited messages."
    }
}
{
    "id": 0,
    "result": null,
    "error": {
        "code": -32700,
        "message": "cant parse message"
    }
}
{
    "id": 1,
    "result": null,
    "error": {
        "code": -32601,
        "message": "method not found"
    }
}