Enum dropbox_sdk::Error[][src]

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.

Tuple Fields of HttpClient

0: Box<dyn Error + Send + Sync + 'static>
Json(Error)

Something went wrong in the process of transforming your arguments into a JSON string.

Tuple Fields of Json

0: Error
UnexpectedResponse(&'static str)

The Dropbox API response was unexpected or malformed in some way.

Tuple Fields of UnexpectedResponse

0: &'static str
BadRequest(String)

The Dropbox API indicated that your request was malformed in some way.

Tuple Fields of BadRequest

0: String
Authentication(AuthError)

Errors occurred during authentication.

Tuple Fields of Authentication

0: AuthError
RateLimited

Your request was rejected due to rate-limiting. You can retry it later.

Fields of RateLimited

reason: RateLimitReason

The server-given reason for the rate-limiting.

retry_after_seconds: u32

You can retry this request after this many seconds.

AccessDenied(AccessError)

The user or team account doesn’t have access to the endpoint or feature.

Tuple Fields of AccessDenied

0: AccessError
ServerError(String)

The Dropbox API server had an internal error.

Tuple Fields of ServerError

0: String
UnexpectedHttpError

The Dropbox API returned an unexpected HTTP response code.

Fields of UnexpectedHttpError

code: u16

HTTP status code returned.

status: String

The HTTP status string.

json: String

The response body.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.