pub struct MangaDexError {
    pub id: Uuid,
    pub status: u16,
    pub title: Option<String>,
    pub detail: Option<String>,
    pub context: Option<HashMap<String, String>>,
}

Fields

id: Uuidstatus: u16

HTTP status code.

title: Option<String>

Error title.

detail: Option<String>

Description about the error.

context: Option<HashMap<String, String>>

Provides insight into why the request failed.

Captcha Errors (400)

The error may have been caused by one of the following:

  • Captcha challenge result was wrong.
  • The Captcha Verification service was down.
  • Other, refer to the error message and the errorCode value.

Rate Limit, Captcha Required (403)

Some endpoints may require captchas to proceed, in order to slow down automated malicious traffic. Legitimate users might also be affected, based on the frequency of write requests or due certain endpoints being particularly sensitive to malicious use, such as user signup.

Once an endpoint decides that a captcha needs to be solved, a 403 Forbidden response will be returned, with the error code captcha_required_exception. The sitekey needed for recaptcha to function is provided in both the X-Captcha-Sitekey header field, as well as in the error context, specified as siteKey parameter.

The captcha result of the client can either be passed into the repeated original request with the X-Captcha-Result header or alternatively to the POST /captcha/solve endpoint. The time a solved captcha is remembered varies across different endpoints and can also be influenced by individual client behavior.

Authentication is not required for the POST /captcha/solve endpoint, captchas are tracked both by client ip and logged in user id. If you are logged in, you want to send the session token along, so you validate the captcha for your client ip and user id at the same time, but it is not required.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. 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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more