#[non_exhaustive]pub enum ApiError {
InvalidBaseUrl {
url: String,
message: String,
},
Http(Error),
Io(Error),
Json(Error),
InvalidInput {
message: String,
},
Status {
status: u16,
message: String,
body: Option<String>,
},
Api {
status: Option<u16>,
error: String,
error_code: Option<i32>,
description: String,
},
}Expand description
Error returned by ApiClient HTTP calls.
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.
InvalidBaseUrl
Invalid Inline API base URL supplied to an API client builder.
Fields
Http(Error)
A network, TLS, redirect, or HTTP client error from reqwest.
Io(Error)
Local file system error, currently used when reading upload inputs.
Json(Error)
JSON encoding or decoding error.
InvalidInput
SDK input validation error before sending a request.
Status
Non-success HTTP status where the body could not be decoded as an Inline error.
Fields
Api
Inline API error decoded from a structured response body.
Trait Implementations§
Source§impl Error for ApiError
impl Error for ApiError
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 ApiError
impl !UnwindSafe for ApiError
impl Freeze for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnsafeUnpin for ApiError
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