pub enum Error {
Show 26 variants
ReqwestError(Error),
InvalidHeaderValue(InvalidHeaderValue),
InvalidHeaderName(InvalidHeaderName),
UrlError(ParseError),
InvalidApiKey,
NoApiKey,
TooManyRequests(DateTime<Utc>),
InternalServerError,
PartnerNotFound,
CurrenciesNotFound(String),
InvalidParam(String),
NoPartnersFoundUsingFilter(String),
MissingParam(String),
MissingRequiredParams(String),
CurrencyNotFound(String),
PartnerDoesNotSupportFixed(String),
PartnerCannotProcessPair(String),
ValidationOfAddressFailed,
RefundAddressInvalid,
UserIpIsIncorrect,
AmountRequestFailed,
IpAddressIsForbidden,
AmountMinimum(f64),
AmountMaximum(f64),
ExchangeNotFound,
UnmatchedError(String),
}
Expand description
all possible errors from the API and their corresponding error messages
Variants§
ReqwestError(Error)
InvalidHeaderValue(InvalidHeaderValue)
InvalidHeaderName(InvalidHeaderName)
UrlError(ParseError)
InvalidApiKey
401 Access denied. Invalid api key.
NoApiKey
401 Access denied. No api key provided.
TooManyRequests(DateTime<Utc>)
429 Too many requests, your key access is suspended until 2023-01-01 00:00 UTC.
InternalServerError
500 Internal Server Error
PartnerNotFound
422 Partner not found
CurrenciesNotFound(String)
422 Currencies not found: 123-btc
InvalidParam(String)
422 Invalid param “amount”
NoPartnersFoundUsingFilter(String)
422 No partners found using filter: 123
MissingParam(String)
400 Missing required param “fromCurrency”
MissingRequiredParams(String)
400 The following required params are missing: partner
CurrencyNotFound(String)
422 Currency not found: btc123-btc
PartnerDoesNotSupportFixed(String)
400 Partner FixedFloat does not support fixed type of exchanges
PartnerCannotProcessPair(String)
422 Pair cannot be processed by fixedfloat
ValidationOfAddressFailed
422 Validation of address failed
RefundAddressInvalid
422 The following refund address invalid
UserIpIsIncorrect
422 userIp is incorrect
AmountRequestFailed
422 Amount request failed
IpAddressIsForbidden
403 IP address is forbidden
AmountMinimum(f64)
422 Amount minimum is 0.00019451
AmountMaximum(f64)
422 Amount maximum is 1.8146447
ExchangeNotFound
404 Exchange not found