pub enum StatusCode {
    Ok,
    Created,
    NoContent,
    NotModified,
    BadRequest,
    Unauthorized,
    Forbidden,
    NotFound,
    MethodNotAllowed,
    TooManyRequests,
    InternalServerError,
    Unknown(u16),
}
Expand description

HTTP Status Codes defined by the Mailjet API.

Statuses documented in the official documentation are enumerated in the StatusCode enum. The documentation provided for each StatusCode is taken from the documentation as is:

Reference

https://dev.mailjet.com/email/reference/overview/errors/

Variants§

§

Ok

All went well. Congrats!

§

Created

The POST request was successfully executed.

§

NoContent

No content found or expected to return. Returned when a DELETE request was successful.

§

NotModified

The PUT request didn’t affect any record.

§

BadRequest

One or more parameters are missing or maybe misspelled (unknown resource or action).

§

Unauthorized

You have specified an incorrect API Key / API Secret Key pair. You may be unauthorized to access the API or your API key may be inactive. Visit API keys Management section to check your keys.

§

Forbidden

You are not authorized to access this resource.

§

NotFound

The resource with the specified ID you are trying to reach does not exist.

§

MethodNotAllowed

The method requested on the resource does not exist.

§

TooManyRequests

Oops! You have reached the maximum number of calls allowed per minute by our API. Please review your integration to reduce the number of calls issued by your system.

§

InternalServerError

Ouch! Something went wrong on our side and we apologize! When such error occurs, it will contain an error identifier in its description (e.g. “ErrorIdentifier” : “D4DF574C-0C5F-45C7-BA52-7AA8E533C3DE”), which is crucial for us to track the problem and identify the root cause. Please contact our support team, providing the error identifier and we will do our best to help.

§

Unknown(u16)

An unkown status code is received from the Mailjet API

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.

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

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 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