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
UnmatchedError(String)
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<(StatusCode, String)> for Error
impl From<(StatusCode, String)> for Error
Source§fn from(val: (StatusCode, String)) -> Self
fn from(val: (StatusCode, String)) -> Self
Source§impl From<InvalidHeaderName> for Error
impl From<InvalidHeaderName> for Error
Source§fn from(source: InvalidHeaderName) -> Self
fn from(source: InvalidHeaderName) -> Self
Source§impl From<InvalidHeaderValue> for Error
impl From<InvalidHeaderValue> for Error
Source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.