pub enum AxHttpError {
MissingCredentials,
ApiError {
message: String,
},
JsonError(String),
ValidationError(String),
BuildError(AxBuildError),
Canceled(String),
NetworkError(String),
UnexpectedStatus {
status: u16,
body: String,
},
}Expand description
A typed error enumeration for the Ax HTTP client.
Variants§
MissingCredentials
Error variant when credentials are missing but the request is authenticated.
ApiError
Errors returned directly by AX Exchange API.
JsonError(String)
Failure during JSON serialization/deserialization.
ValidationError(String)
Parameter validation error.
BuildError(AxBuildError)
Build error for query parameters.
Canceled(String)
Request was canceled, typically due to shutdown or disconnect.
NetworkError(String)
Generic network error (for retries, cancellations, etc).
UnexpectedStatus
Any unknown HTTP status or unexpected response from Ax.
Trait Implementations§
Source§impl Clone for AxHttpError
impl Clone for AxHttpError
Source§fn clone(&self) -> AxHttpError
fn clone(&self) -> AxHttpError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AxHttpError
impl Debug for AxHttpError
Source§impl Display for AxHttpError
impl Display for AxHttpError
Source§impl Error for AxHttpError
impl Error for AxHttpError
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<AxBuildError> for AxHttpError
impl From<AxBuildError> for AxHttpError
Source§fn from(source: AxBuildError) -> Self
fn from(source: AxBuildError) -> Self
Converts to this type from the input type.
Source§impl From<AxErrorResponse> for AxHttpError
impl From<AxErrorResponse> for AxHttpError
Source§fn from(error: AxErrorResponse) -> Self
fn from(error: AxErrorResponse) -> Self
Converts to this type from the input type.
Source§impl From<AxHttpError> for PyErr
impl From<AxHttpError> for PyErr
Source§fn from(error: AxHttpError) -> Self
fn from(error: AxHttpError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for AxHttpError
impl From<Error> for AxHttpError
Source§impl From<HttpClientError> for AxHttpError
impl From<HttpClientError> for AxHttpError
Auto Trait Implementations§
impl Freeze for AxHttpError
impl RefUnwindSafe for AxHttpError
impl Send for AxHttpError
impl Sync for AxHttpError
impl Unpin for AxHttpError
impl UnwindSafe for AxHttpError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.