Enum aragog::error::ArangoHttpError[][src]

pub enum ArangoHttpError {
    BadParameter,
    Unauthorized,
    Forbidden,
    NotFound,
    MethodNotAllowed,
    NotAcceptable,
    Conflict,
    PreconditionFailed,
    ServerError,
    ServiceUnavailable,
    GatewayTimeout,
    CorruptedJson,
    SuperfluousSuffices,
    UnknownError(u16),
}

Arango Http error based on the response http code

Variants

BadParameter

400 - ERROR_HTTP_BAD_PARAMETER

Will be raised when the HTTP request does not fulfill the requirements.

Unauthorized

401 - ERROR_HTTP_UNAUTHORIZED

Will be raised when authorization is required but the user is not authorized.

Forbidden

403 - ERROR_HTTP_FORBIDDEN

Will be raised when the operation is forbidden.

NotFound

404 - ERROR_HTTP_NOT_FOUND

Will be raised when an URI is unknown or a database element is not found.

MethodNotAllowed

405 - ERROR_HTTP_METHOD_NOT_ALLOWED

Will be raised when an unsupported HTTP method is used for an operation.

NotAcceptable

406 - ERROR_HTTP_NOT_ACCEPTABLE

Will be raised when an unsupported HTTP content type is used for an operation

Conflict

409 - ERROR_HTTP_CONFLICT

Will be raised when conflict occured (index unique constraint for example)

PreconditionFailed

412 - ERROR_HTTP_PRECONDITION_FAILED

Will be raised when a precondition for an HTTP request is not met.

ServerError

500 - ERROR_HTTP_SERVER_ERROR

Will be raised when an internal server is encountered.

ServiceUnavailable

503 - ERROR_HTTP_SERVICE_UNAVAILABLE

Will be raised when a service is temporarily unavailable.

GatewayTimeout

504 - ERROR_HTTP_GATEWAY_TIMEOUT

Will be raised when a service contacted by ArangoDB does not respond in a timely manner.

CorruptedJson

600 - ERROR_HTTP_CORRUPTED_JSON

Will be raised when a string representation of a JSON object is corrupt.

SuperfluousSuffices

601 - ERROR_HTTP_SUPERFLUOUS_SUFFICES

Will be raised when the URL contains superfluous suffices.

UnknownError(u16)

Unknown Http error, happens when the HTTP code is not handled

Implementations

impl ArangoHttpError[src]

pub fn http_code(&self) -> u16[src]

The HTTP code matching the enum variant

Trait Implementations

impl Clone for ArangoHttpError[src]

impl Debug for ArangoHttpError[src]

impl Display for ArangoHttpError[src]

impl Error for ArangoHttpError[src]

impl PartialEq<ArangoHttpError> for ArangoHttpError[src]

impl StructuralPartialEq for ArangoHttpError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.