pub enum ConfigClientError {
Request(Error),
TokenProvider(TokenProviderError),
HttpStatus {
status: u16,
body: String,
},
}Expand description
Unified error type for ConfigClient requests (SMOODEV-975).
Combines transport, OAuth, and decode failures so callers don’t have
to discriminate between reqwest::Error and TokenProviderError
at the call site.
Variants§
Request(Error)
Underlying HTTP / JSON failure.
TokenProvider(TokenProviderError)
OAuth handshake or refresh failure.
HttpStatus
Server returned a non-success status. Use
ConfigClientError::status to branch on the code.
Implementations§
Trait Implementations§
Source§impl Debug for ConfigClientError
impl Debug for ConfigClientError
Source§impl Display for ConfigClientError
impl Display for ConfigClientError
Source§impl Error for ConfigClientError
impl Error for ConfigClientError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ConfigClientError> for BuildError
impl From<ConfigClientError> for BuildError
Source§fn from(source: ConfigClientError) -> Self
fn from(source: ConfigClientError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for ConfigClientError
impl From<Error> for ConfigClientError
Source§impl From<TokenProviderError> for ConfigClientError
impl From<TokenProviderError> for ConfigClientError
Source§fn from(source: TokenProviderError) -> Self
fn from(source: TokenProviderError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ConfigClientError
impl !RefUnwindSafe for ConfigClientError
impl Send for ConfigClientError
impl Sync for ConfigClientError
impl Unpin for ConfigClientError
impl UnsafeUnpin for ConfigClientError
impl !UnwindSafe for ConfigClientError
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