pub enum MsgraphSendError {
Send(Http11SendError),
SerializeRequest(Error),
ParseResponse(Error),
ParseUrl(ParseError),
InvalidRequest(String),
Api(Box<MsgraphApiError>),
UnexpectedRedirect,
}Expand description
Error returned by MsgraphSend and the raw $value coroutines.
Variants§
Send(Http11SendError)
The underlying HTTP/1.1 exchange failed.
SerializeRequest(Error)
The JSON request body could not be serialized.
ParseResponse(Error)
The 2xx response body could not be deserialized.
ParseUrl(ParseError)
The request URL could not be built.
InvalidRequest(String)
The request arguments were rejected before sending.
Api(Box<MsgraphApiError>)
The Graph API answered a non-2xx status.
UnexpectedRedirect
The server answered a 3xx; redirects are never followed.
Implementations§
Source§impl MsgraphSendError
impl MsgraphSendError
Sourcepub fn api(&self) -> Option<&MsgraphApiError>
pub fn api(&self) -> Option<&MsgraphApiError>
The API error of a non-2xx answer, None for every other
variant.
Sourcepub fn status(&self) -> Option<u16>
pub fn status(&self) -> Option<u16>
The HTTP status of an Api error, None for
every other variant.
Sourcepub fn retry_after(&self) -> Option<Duration>
pub fn retry_after(&self) -> Option<Duration>
How long the server asked to wait before a retry
(MsgraphApiError::retry_after).
Sourcepub fn is_throttled(&self) -> bool
pub fn is_throttled(&self) -> bool
Whether Graph throttled the request
(MsgraphApiError::is_throttled).
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether the request can be sent again as it is
(MsgraphApiError::is_retryable).
Trait Implementations§
Source§impl Debug for MsgraphSendError
impl Debug for MsgraphSendError
Source§impl Display for MsgraphSendError
impl Display for MsgraphSendError
Source§impl Error for MsgraphSendError
impl Error for MsgraphSendError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Http11SendError> for MsgraphSendError
impl From<Http11SendError> for MsgraphSendError
Source§fn from(err: Http11SendError) -> Self
fn from(err: Http11SendError) -> Self
Source§impl From<MsgraphApiError> for MsgraphSendError
impl From<MsgraphApiError> for MsgraphSendError
Source§fn from(err: MsgraphApiError) -> Self
fn from(err: MsgraphApiError) -> Self
Source§impl From<MsgraphSendError> for MsgraphClientStdError
Available on crate feature client only.
impl From<MsgraphSendError> for MsgraphClientStdError
client only.