pub enum ParalockErrorCode {
Show 13 variants
InvalidRequest,
QuoteRejected,
QuoteExpired,
NotFound,
Conflict,
LimitExceeded,
Busy,
InsufficientLiquidity,
UnsafeTimeouts,
LockMismatch,
Unavailable,
Timeout,
Internal,
}Expand description
Machine-readable error codes. Each maps to an HTTP status (ParalockErrorCode::status).
Variants§
InvalidRequest
400: malformed input.
QuoteRejected
422: the taker refused a maker’s quote (bad key, token, window, price…).
QuoteExpired
410: the quote is unknown, used or past its expiry.
NotFound
404: no such swap.
Conflict
409: the request conflicts with the swap’s state.
LimitExceeded
422: outside the maker’s per-swap limits.
Busy
429: too many open quotes or concurrent swaps.
InsufficientLiquidity
503: the maker lacks the stablecoin inventory.
UnsafeTimeouts
422: the Zcash window doesn’t outlast the EVM lock by the safety factor.
LockMismatch
422: an on-chain lock doesn’t match the agreed terms.
503: a dependency (node, price feed, maker) is unreachable.
Timeout
504: waited too long for something on-chain.
Internal
500: anything else. Its message is never sent to clients.
Implementations§
Trait Implementations§
Source§impl Clone for ParalockErrorCode
impl Clone for ParalockErrorCode
impl Copy for ParalockErrorCode
Source§impl Debug for ParalockErrorCode
impl Debug for ParalockErrorCode
Source§impl<'de> Deserialize<'de> for ParalockErrorCode
impl<'de> Deserialize<'de> for ParalockErrorCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ParalockErrorCode
impl Display for ParalockErrorCode
impl Eq for ParalockErrorCode
Source§impl Hash for ParalockErrorCode
impl Hash for ParalockErrorCode
Source§impl PartialEq for ParalockErrorCode
impl PartialEq for ParalockErrorCode
Source§impl Serialize for ParalockErrorCode
impl Serialize for ParalockErrorCode
impl StructuralPartialEq for ParalockErrorCode
Auto Trait Implementations§
impl Freeze for ParalockErrorCode
impl RefUnwindSafe for ParalockErrorCode
impl Send for ParalockErrorCode
impl Sync for ParalockErrorCode
impl Unpin for ParalockErrorCode
impl UnsafeUnpin for ParalockErrorCode
impl UnwindSafe for ParalockErrorCode
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
Mutably borrows from an owned value. Read more