Interface IDEXErrorEvent

When an error occurs during evaluation by the WebSocket Server, this error message will be provided to the message handler.

interface IDEXErrorEvent {
    type: "error";
    data: {
        code: string;
        message: string;
    };
    cid?: string;
    subscriptions?: unknown[];
}

Hierarchy (view full)

Properties

type: "error"

The type property is used to determine the shape of the data property of the update event.

  • Subscription update events will match IDEXSubscriptionEventBase with the subscription name as the value for the type property.
  • Otherwise the type will be:
    • subscriptions if you requested a list of all current subscriptions
    • error if your request resulted in a server error
data: {
    code: string;
    message: string;
}

The data object will change based on the type of the message.

Type declaration

  • code: string

    error short code

  • message: string

    human readable error message

cid?: string

If the request provided a cid parameter, the response will include the cid provided.

subscriptions?: unknown[]

A list of all active subscriptions if the type is subscriptions