#[non_exhaustive]pub enum BrokerError {
Show 14 variants
UnknownProvider(String),
RegistrationRequired {
provider: String,
remediation: String,
},
NotConfigured(String),
Unauthorized,
Denied(String),
UnsupportedCapability {
provider: String,
capability: String,
},
Transport(String),
Credential(String),
UnknownAccount {
provider: String,
label: String,
},
UnsupportedAccount {
provider: String,
label: String,
},
InvalidAccount(String),
NoAccountAvailable {
provider: String,
reason: String,
failure: Option<SelectionFailure>,
},
BrokerTooOld(String),
Refresh(RefreshFailure),
}Expand description
Broker failures. Messages never contain credential values. Non-exhaustive: new failure kinds are added as brokers gain operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownProvider(String)
The named provider is not in any broker registry.
RegistrationRequired
A required public-client registration is not configured.
NotConfigured(String)
The provider is known but has no credential configured.
The caller failed broker (machine) authentication.
Denied(String)
The request was rejected by broker policy (e.g. malformed proxy path).
UnsupportedCapability
The route honestly lacks a capability the request needs (e.g. tools on a text-only cloud route). Raised pre-flight, before credentials/network.
Transport(String)
Transport-level failure talking to the broker or the provider.
Credential(String)
Credential storage/refresh failure (message is already secret-free).
UnknownAccount
An explicitly requested account slot does not exist. Never a fallback.
UnsupportedAccount
This broker implementation cannot address named account slots.
InvalidAccount(String)
An account label failed validation (CLI/env/config/HTTP boundary).
NoAccountAvailable
Automatic selection found no account with proven capacity. failure
is the typed explanation (top-level kind plus every account’s kind
and HTTP status) when the broker knows it; reason its text.
BrokerTooOld(String)
The remote broker predates an operation this client needs; the payload names what is unavailable. Upgrade the broker host.
Refresh(RefreshFailure)
A locked token refresh failed; the kind tells a per-account cooldown, a busy refresh lock or a transient network/provider failure apart from an unusable login. Message is secret-free.
Trait Implementations§
Source§impl Clone for BrokerError
impl Clone for BrokerError
Source§impl Debug for BrokerError
impl Debug for BrokerError
Source§impl Display for BrokerError
impl Display for BrokerError
impl Eq for BrokerError
Source§impl Error for BrokerError
impl Error for BrokerError
1.30.0 · 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
use the Display impl or to_string()
Source§impl PartialEq for BrokerError
impl PartialEq for BrokerError
impl StructuralPartialEq for BrokerError
Auto Trait Implementations§
impl Freeze for BrokerError
impl RefUnwindSafe for BrokerError
impl Send for BrokerError
impl Sync for BrokerError
impl Unpin for BrokerError
impl UnsafeUnpin for BrokerError
impl UnwindSafe for BrokerError
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.