pub enum Error {
InternalError {
message: Option<String>,
},
ValidationError(String),
NotFound {
item: String,
id: String,
source: Option<DatabaseError>,
},
UnprocessableEntity {
source: Box<dyn Error + Send + Sync>,
},
ArangoError(DatabaseError),
Conflict(DatabaseError),
InitError {
item: String,
message: String,
},
Unauthorized(Option<DatabaseError>),
Forbidden(Option<DatabaseError>),
}
Expand description
Error enum used for the Arango ORM mapped as potential Http errors
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.
NotFound
Fields
source: Option<DatabaseError>
Optional database source error
An Item (document or collection) could not be found.
Can be interpreted as a HTTP code 404
not found.
UnprocessableEntity
An operation failed due to format or data issue.
Can be interpreted as a HTTP code 422
Unprocessable Entity.
ArangoError(DatabaseError)
The ArangoDb Error as returned by the database host
Can be interpreted as a HTTP code 500
Internal Error.
Conflict(DatabaseError)
A database conflict occured
Can be interpreted as a HTTP code 409
Conflict.
InitError
Failed to load config or initialize the app.
Can be interpreted as a HTTP code 500
Internal Error.
The operation is refused due to lack of authentication.
Can be interpreted as a HTTP code 401
unauthorized.
Forbidden(Option<DatabaseError>)
The operation is refused and authentication cannot resolve it.
Can be interpreted as a HTTP code 403
forbidden.