pub enum ConcurError {
Http(Error),
Json(Error),
Url(ParseError),
Api {
status: StatusCode,
message: String,
correlation_id: Option<String>,
},
Auth(String),
RetryExhausted {
attempts: u32,
},
MissingParameter(String),
Other(String),
}Expand description
Errors returned by the SAP Concur API client.
Variants§
Http(Error)
HTTP transport error.
Json(Error)
JSON serialization / deserialization error.
Url(ParseError)
URL parsing error.
Api
An error returned by the SAP Concur API.
Auth(String)
Authentication error.
RetryExhausted
Retry budget exhausted.
MissingParameter(String)
A required field or parameter was missing.
Other(String)
Generic error message.
Implementations§
Source§impl ConcurError
impl ConcurError
pub fn api(status: StatusCode, message: impl Into<String>) -> Self
pub fn with_correlation_id(self, id: impl Into<String>) -> Self
Trait Implementations§
Source§impl Debug for ConcurError
impl Debug for ConcurError
Source§impl Display for ConcurError
impl Display for ConcurError
Source§impl Error for ConcurError
impl Error for ConcurError
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 ConcurError
impl From<Error> for ConcurError
Source§impl From<Error> for ConcurError
impl From<Error> for ConcurError
Source§impl From<ParseError> for ConcurError
impl From<ParseError> for ConcurError
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 ConcurError
impl !UnwindSafe for ConcurError
impl Forget for ConcurError
impl Freeze for ConcurError
impl Send for ConcurError
impl Sync for ConcurError
impl Unpin for ConcurError
impl UnsafeUnpin for ConcurError
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