pub enum Error {
Show 23 variants
UnexpectedClose,
PingTimeout,
UnexpectedMessage,
UnexpectedMessageFormat,
UnknownResponseId,
MaxConcurrentRequestLimitReached,
BackendShutDown,
ErrorMsg(String),
ErrorResponse(ResponseError),
ConnectionClosed,
CsvAsync(Error),
IO(Error),
Reqwest(Error),
SerdeJson(Error),
Tungstenite(Error),
Url(ParseError),
Custom(Cow<'static, str>),
UnknownReserveEvent(i32),
UnknownEventType(i32),
UnknownSide(i32),
UnknownTransactionType(i32),
RequestID(Error),
InvalidChainId(HashSet<ChainId>),
}
Expand description
A collections of errors that can occur when using this crate
Variants§
UnexpectedClose
The connection was closed unexpectedly This should usually not happen
PingTimeout
UnexpectedMessage
The server sent and unexpected WebSocket message This should usually not happen
UnexpectedMessageFormat
The server send a malformed message This should usually not happen
UnknownResponseId
The server sent a response for a requests without a listener This should usually not happen
MaxConcurrentRequestLimitReached
The maximum limit of 256 concurrent requests was reached
Note, that requests with open end (live streams) can currently not be unsubscribed. If you run into that you could create a new WebSocket connection to clean up
BackendShutDown
The backend websocket service shutdown This happens, when the server closes the connection
ErrorMsg(String)
The server sent an error message as part of the response
ErrorResponse(ResponseError)
The server sent an error as part of the response
ConnectionClosed
The websocket connection was closed by the server
CsvAsync(Error)
An error encountered during csv parsing
IO(Error)
An IO error
Reqwest(Error)
An error encountered during making HTTP requests
SerdeJson(Error)
An error encountered during cbor parsing
Tungstenite(Error)
An error encountered during websocket handling
Url(ParseError)
An error encountered during url parsing