Enum dropbox_sdk::Error
source · [−]pub enum Error {
HttpClient(Box<dyn Error + Send + Sync + 'static>),
Json(Error),
UnexpectedResponse(&'static str),
BadRequest(String),
Authentication(AuthError),
RateLimited {
reason: RateLimitReason,
retry_after_seconds: u32,
},
AccessDenied(AccessError),
ServerError(String),
UnexpectedHttpError {
code: u16,
status: String,
json: String,
},
}
Expand description
An error occurred in the process of making an API call. This is different from the case where your call succeeded, but the operation returned an error.
Variants
HttpClient(Box<dyn Error + Send + Sync + 'static>)
Some error from the internals of the HTTP client.
Json(Error)
Something went wrong in the process of transforming your arguments into a JSON string.
UnexpectedResponse(&'static str)
The Dropbox API response was unexpected or malformed in some way.
BadRequest(String)
The Dropbox API indicated that your request was malformed in some way.
Authentication(AuthError)
Errors occurred during authentication.
RateLimited
Fields
reason: RateLimitReason
The server-given reason for the rate-limiting.
retry_after_seconds: u32
You can retry this request after this many seconds.
Your request was rejected due to rate-limiting. You can retry it later.
AccessDenied(AccessError)
The user or team account doesn’t have access to the endpoint or feature.
ServerError(String)
The Dropbox API server had an internal error.
UnexpectedHttpError
Fields
code: u16
HTTP status code returned.
status: String
The HTTP status string.
json: String
The response body.
The Dropbox API returned an unexpected HTTP response code.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<FromUtf8Error> for Error
Available on crate feature default_client
only.
impl From<FromUtf8Error> for Error
default_client
only.sourcefn from(e: FromUtf8Error) -> Self
fn from(e: FromUtf8Error) -> Self
Converts to this type from the input type.
sourceimpl From<RequestError> for Error
Available on crate feature default_client
only.
impl From<RequestError> for Error
default_client
only.sourcefn from(e: RequestError) -> Self
fn from(e: RequestError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more