pub enum Error {
Server {
inner: ResponseError,
http_code: StatusCode,
},
ServerPlain {
inner: String,
http_code: StatusCode,
},
ServerUnknown(StatusCode),
SerializeRequest(Error),
DeserializeResponse(Error),
Http(Error),
MissingApiKey,
InvalidApiKey(String),
MissingSecretKey,
InvalidSecretKey {
size: usize,
},
CannotGetTimestamp,
}
Expand description
Aggregated crate errors.
Variants§
Server
Binance server returned a formatted error response from API query.
Fields
inner: ResponseError
the actual error from a server
http_code: StatusCode
HTTP code associated with an error. See more at https://binance-docs.github.io/apidocs/spot/en/#http-return-codes.
ServerPlain
Binance server returned not a properly formatted error response from API query.
Fields
http_code: StatusCode
HTTP code associated with an error. See more at https://binance-docs.github.io/apidocs/spot/en/#http-return-codes.
ServerUnknown(StatusCode)
Binance server returned error code containing not a valid UTF-8 text.
Tuple Fields
0: StatusCode
HTTP code associated with an error. See more at https://binance-docs.github.io/apidocs/spot/en/#http-return-codes.
SerializeRequest(Error)
The request cannot be serialized into valid URL.
DeserializeResponse(Error)
The response cannot be deserialized into valid JSON.
Http(Error)
General HTTP error while doing a request.
MissingApiKey
The request requires an API key but it is missing.
InvalidApiKey(String)
The request requires an API key but it cannot be encoded properly.
MissingSecretKey
The request requires secret key to sign the query but it is missing.
InvalidSecretKey
The request requires secret key to sign the query but it is missing.
CannotGetTimestamp
The current timestamp (milliseconds since UNIX epoch) cannot be retrieved.