[][src]Enum aragog::ServiceError

pub enum ServiceError {
    InternalError,
    ValidationError(String),
    Timeout,
    NotFound(String),
    UnprocessableEntity,
    Unauthorized,
    Forbidden,
    Conflict,
}

Error enum used for the Arango ORM mapped as potential Http errors

Features

If the cargo feature actix_http_error is enabled, ServiceError will implement the actix-web error system. Allowing ServiceError to be used in actix-web http endpoints.

Variants

InternalError

Unhandled error. Can be interpreted as a HTTP code 500 internal error.

ValidationError(String)

Validations failed (see model validation as implemented in Validate. Can be interpreted as a HTTP code 400 bad request.

Timeout

A query/request timed out. Can be interpreted as a HTTP code 408 Request timeout.

NotFound(String)

A record could not be found (see record query as implemented in Record). Can be interpreted as a HTTP code 404 not found.

UnprocessableEntity

An operation on a document failed due to format or data issue. Can be interpreted as a HTTP code 422 unprocessable entity.

Unauthorized

The operation is refused due to lack of authentication. Can be interpreted as a HTTP code 401 unauthorized.

Forbidden

The operation is refused and authentication cannot resolve it. Can be interpreted as a HTTP code 403 forbidden.

Conflict

The operation fails due to a conflict, for example a unique index was not respected. Can be interpreted as a HTTP code 409 conflict.

Implementations

impl ServiceError[src]

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

Retrieves the matching HTTP code as a string.

Trait Implementations

impl Debug for ServiceError[src]

impl Default for ServiceError[src]

impl Display for ServiceError[src]

impl Error for ServiceError[src]

impl From<ClientError> for ServiceError[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, U> Into<U> for T where
    U: From<T>, 
[src]

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.