#[non_exhaustive]pub enum Error {
Transport(Error),
Timeout,
Body(Error),
Status {
status: StatusCode,
body: Bytes,
},
Decode(Error),
NotFound,
MissingSecret,
PathTemplate(String),
InvalidInput(Box<dyn StdError + Send + Sync>),
}Expand description
Errors returned by SDK calls.
#[non_exhaustive]: new variants may be added in future releases, so
downstream match statements must include a _ => arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Transport(Error)
The request could not be sent (DNS, TLS, connect).
Timeout
The request exceeded its configured timeout.
Body(Error)
The response body could not be read.
Status
The platform returned a non-2xx status; the raw body is preserved.
Decode(Error)
A response body could not be deserialized into the requested type.
NotFound
No connection matched the requested key.
MissingSecret
The client was built without a credential.
PathTemplate(String)
A path template referenced a variable not supplied in the path object.
InvalidInput(Box<dyn StdError + Send + Sync>)
A generated action’s input is missing a required field or holds an invalid value; the source is the builder’s or the router’s own error.
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)>
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<Error> for WebhookError
impl From<Error> for WebhookError
Auto Trait Implementations§
impl !Freeze for Error
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget for Error
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Errorwhere
*const Inner is !null: UnsafeUnpin,
PhantomData<Inner>: UnsafeUnpin,
NonZeroU16Inner: UnsafeUnpin,
*const u8: UnsafeUnpin,
Align8<*mut ()>: UnsafeUnpin,
&'static Vtable: UnsafeUnpin,
*const ErrorImpl is !null: UnsafeUnpin,
PhantomData<ErrorImpl>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const dyn Error + Sync + Send is !null: UnsafeUnpin,
PhantomData<dyn Error + Sync + Send>: UnsafeUnpin,
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