pub enum HttpClientError<H: HttpHandler> {
Show 14 variants
SerializationBufferFull(usize),
Serialization,
Utf8Conversion(usize),
SendRequest(H::Error),
NoStatusCode,
ParseHttp(Error),
PartialHttpRequest,
NoContentHeader,
ContentLengthConversion(ParseIntError),
DeserializationFailed(Error),
MissingStatusField,
MissingDataField,
FailedAndMissingMessageField,
GenericApiError(StatusCode),
}Expand description
Errors that might get returned by the HttpClient.
Variants§
SerializationBufferFull(usize)
Cannot serialize the body because the buffer is full: {0}
Serialization
Cannot serialize the body
Utf8Conversion(usize)
Cannot convert UTF-8 characters: Valid up to {0}
SendRequest(H::Error)
Failed to send HTTPS request
NoStatusCode
No status code found in the HTTP response
ParseHttp(Error)
Cannot parse the HTTP response: {0:?}
PartialHttpRequest
The HTTPS response is only partial
NoContentHeader
No content header in response
ContentLengthConversion(ParseIntError)
Cannot convert &u8 buffer into a ‘usize’: {0:?}
DeserializationFailed(Error)
Cannot deserialize the body into the provided type {0:?}
MissingStatusField
Request Might have failed: no “status” field found
MissingDataField
Request succeeded but no “data” field found
FailedAndMissingMessageField
Request failed and no “message” field found
GenericApiError(StatusCode)
Error coming from the Api with message (message stored in HttpClientErrorWrapper)
Trait Implementations§
Source§impl<H: HttpHandler> Display for HttpClientError<H>
impl<H: HttpHandler> Display for HttpClientError<H>
Source§impl<H: HttpHandler> Format for HttpClientError<H>
impl<H: HttpHandler> Format for HttpClientError<H>
Source§impl<'a, H: HttpHandler> From<HttpClientError<H>> for HttpClientErrorWrapper<'a, H>
impl<'a, H: HttpHandler> From<HttpClientError<H>> for HttpClientErrorWrapper<'a, H>
Source§fn from(source: HttpClientError<H>) -> Self
fn from(source: HttpClientError<H>) -> Self
Converts to this type from the input type.
Source§impl<H: HttpHandler> From<HttpClientErrorWrapper<'_, H>> for HttpClientError<H>
impl<H: HttpHandler> From<HttpClientErrorWrapper<'_, H>> for HttpClientError<H>
Source§fn from(err: HttpClientErrorWrapper<'_, H>) -> Self
fn from(err: HttpClientErrorWrapper<'_, H>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<H> Freeze for HttpClientError<H>
impl<H> RefUnwindSafe for HttpClientError<H>
impl<H> Send for HttpClientError<H>
impl<H> Sync for HttpClientError<H>
impl<H> Unpin for HttpClientError<H>
impl<H> UnwindSafe for HttpClientError<H>
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