#[non_exhaustive]pub enum Error {
AuthenticationError(Box<ApiError>),
PermissionDeniedError(Box<ApiError>),
ApiConnectionError(Error),
InvalidRequestError(Box<ApiError>),
RateLimitError(Box<ApiError>),
NotFoundError(Box<ApiError>),
ListenApiError(Box<ApiError>),
InvalidParameter(String),
Reqwest(Error),
Json(Error),
}Expand description
Errors returned by crate::Client. HTTP errors retain their response context.
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.
AuthenticationError(Box<ApiError>)
Wrong API key or a suspended account (401).
PermissionDeniedError(Box<ApiError>)
The account is not allowed to perform this operation (403).
ApiConnectionError(Error)
Unable to connect or a request timed out.
InvalidRequestError(Box<ApiError>)
Invalid API request (400).
RateLimitError(Box<ApiError>)
Request quota or rate limit exceeded (429).
NotFoundError(Box<ApiError>)
Endpoint or requested content was not found (404).
ListenApiError(Box<ApiError>)
Other unsuccessful HTTP responses, including redirects and server errors.
InvalidParameter(String)
Invalid local parameter structure or path identifier.
Reqwest(Error)
Other errors from the HTTP client.
Json(Error)
JSON creation or processing error.
Implementations§
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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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