pub enum HttpClientError {
InvalidRequestMethod,
InvalidApiKey,
InvalidAccessToken,
MissingEnvVar {
name: &'static str,
},
UnexpectedResponse,
RequestTimeout,
OpenApi {
code: i32,
message: String,
trace_id: String,
},
DeserializeResponseBody(String),
SerializeRequestBody(String),
SerializeQueryString(QsError),
BadStatus(StatusCode),
Http(Error),
}
Expand description
Http client error type
Variants§
InvalidRequestMethod
Invalid request method
InvalidApiKey
Invalid api key
InvalidAccessToken
Invalid access token
MissingEnvVar
Missing environment variable
UnexpectedResponse
Unexpected response
RequestTimeout
Request timeout
OpenApi
OpenAPI error
DeserializeResponseBody(String)
Deserialize response body
SerializeRequestBody(String)
Serialize request body
SerializeQueryString(QsError)
Serialize query string error
BadStatus(StatusCode)
Bad status
Http(Error)
Http error
Trait Implementations§
source§impl Debug for HttpClientError
impl Debug for HttpClientError
source§impl Display for HttpClientError
impl Display for HttpClientError
source§impl Error for HttpClientError
impl Error for HttpClientError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 HttpClientError
impl From<Error> for HttpClientError
Auto Trait Implementations§
impl Freeze for HttpClientError
impl !RefUnwindSafe for HttpClientError
impl Send for HttpClientError
impl Sync for HttpClientError
impl Unpin for HttpClientError
impl !UnwindSafe for HttpClientError
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