pub enum HttpError {
Request(Error),
ApiError {
status: u16,
message: String,
body: Option<Value>,
},
Auth(AuthError),
Json(Error),
InvalidMethod {
method: String,
},
RetriesExhausted {
attempts: u32,
last_error: String,
},
}Expand description
Errors from HTTP client operations.
Variants§
Request(Error)
HTTP request failed.
ApiError
Server returned an error status.
Fields
Auth(AuthError)
Authentication error.
Json(Error)
JSON deserialization error.
InvalidMethod
The HTTP method string is not a valid method token.
RetriesExhausted
All retries exhausted.
Trait Implementations§
Source§impl Error for HttpError
impl Error for HttpError
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<HttpError> for BatchesError
impl From<HttpError> for BatchesError
Source§impl From<HttpError> for CachesError
impl From<HttpError> for CachesError
Source§impl From<HttpError> for EmbedError
impl From<HttpError> for EmbedError
Source§impl From<HttpError> for FilesError
impl From<HttpError> for FilesError
Source§impl From<HttpError> for GenerateError
impl From<HttpError> for GenerateError
Source§impl From<HttpError> for ModelsError
impl From<HttpError> for ModelsError
Source§impl From<HttpError> for TokensError
impl From<HttpError> for TokensError
Auto Trait Implementations§
impl !RefUnwindSafe for HttpError
impl !UnwindSafe for HttpError
impl Freeze for HttpError
impl Send for HttpError
impl Sync for HttpError
impl Unpin for HttpError
impl UnsafeUnpin for HttpError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].