pub enum GraphqlClientError {
UrlNotBase,
Url(ParseError),
HeaderName(InvalidHeaderName),
HeaderValue(InvalidHeaderValue),
Serialize(Error),
Transport(Error),
Http {
status: StatusCode,
body: String,
},
Decode(Error),
EmptyEnvelope,
}Expand description
Request construction, transport, HTTP, or response decoding failure.
GraphQL execution failures instead appear in GraphqlResponse::errors.
Variants§
UrlNotBase
The project URL cannot hold a path.
Url(ParseError)
Invalid project URL.
HeaderName(InvalidHeaderName)
Invalid header name.
HeaderValue(InvalidHeaderValue)
Invalid header value.
Serialize(Error)
Variables or the request could not be serialized.
Transport(Error)
The HTTP request failed.
Http
Non-success HTTP status; the body is retained for caller inspection.
Decode(Error)
JSON did not match the response envelope or requested data type.
EmptyEnvelope
Neither data nor a nonempty errors array was returned.
Trait Implementations§
Source§impl Debug for GraphqlClientError
impl Debug for GraphqlClientError
Source§impl Display for GraphqlClientError
impl Display for GraphqlClientError
Source§impl Error for GraphqlClientError
impl Error for GraphqlClientError
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<Error> for GraphqlClientError
impl From<Error> for GraphqlClientError
Source§impl From<InvalidHeaderName> for GraphqlClientError
impl From<InvalidHeaderName> for GraphqlClientError
Source§fn from(source: InvalidHeaderName) -> Self
fn from(source: InvalidHeaderName) -> Self
Converts to this type from the input type.
Source§impl From<InvalidHeaderValue> for GraphqlClientError
impl From<InvalidHeaderValue> for GraphqlClientError
Source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for GraphqlClientError
impl From<ParseError> for GraphqlClientError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for GraphqlClientError
impl !UnwindSafe for GraphqlClientError
impl Freeze for GraphqlClientError
impl Send for GraphqlClientError
impl Sync for GraphqlClientError
impl Unpin for GraphqlClientError
impl UnsafeUnpin for GraphqlClientError
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