pub enum AuthFailureReason {
MissingCredentials,
Unauthorized,
TokenExpiredAndRefreshFailed,
Suspended,
ScopeInsufficient {
needed: String,
},
}Expand description
Why authentication failed. Closed set — exhaustive matches required.
Drops Copy (was present in v0.1) because
Self::ScopeInsufficient now carries the missing scope name as
a String payload so the LLM client can surface it.
Variants§
MissingCredentials
Credentials missing — neither client_id nor client_secret
were configured. Surfaces when an Account / Trading tool
is called against an anonymous adapter.
Credentials present but rejected by Deribit (HTTP 401 or
upstream JSON-RPC code 10004).
TokenExpiredAndRefreshFailed
A previously valid token expired and the upstream refresh flow could not obtain a replacement (network error during refresh, refresh token revoked, OAuth provider timeout, …).
Suspended
Account suspended on Deribit’s side (e.g. KYC failure,
regulatory hold). Distinct from Unauthorized so the LLM
can advise the user to contact support rather than retry.
ScopeInsufficient
The configured credentials authenticated successfully but the
requested operation needs a scope that was not granted (e.g.
a Trading tool call without trade:read_write). The
payload names the scope the LLM should ask the operator to
add to the API key.
Trait Implementations§
Source§impl Clone for AuthFailureReason
impl Clone for AuthFailureReason
Source§fn clone(&self) -> AuthFailureReason
fn clone(&self) -> AuthFailureReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuthFailureReason
impl Debug for AuthFailureReason
Source§impl<'de> Deserialize<'de> for AuthFailureReason
impl<'de> Deserialize<'de> for AuthFailureReason
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>,
Source§impl PartialEq for AuthFailureReason
impl PartialEq for AuthFailureReason
Source§fn eq(&self, other: &AuthFailureReason) -> bool
fn eq(&self, other: &AuthFailureReason) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for AuthFailureReason
impl Serialize for AuthFailureReason
impl Eq for AuthFailureReason
impl StructuralPartialEq for AuthFailureReason
Auto Trait Implementations§
impl Freeze for AuthFailureReason
impl RefUnwindSafe for AuthFailureReason
impl Send for AuthFailureReason
impl Sync for AuthFailureReason
impl Unpin for AuthFailureReason
impl UnsafeUnpin for AuthFailureReason
impl UnwindSafe for AuthFailureReason
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.