Enum couchdb::Error [] [src]

pub enum Error {
    BadDatabasePath(BadPathKind),
    BadDesignDocumentPath(BadPathKind),
    BadDocumentPath(BadPathKind),
    BadRequest(Option<ErrorResponse>),
    BadRevision,
    BadUuid,
    BadViewPath(BadPathKind),
    DatabaseExists(Option<ErrorResponse>),
    DocumentConflict(Option<ErrorResponse>),
    InternalServerError(Option<ErrorResponse>),
    NotFound(Option<ErrorResponse>),
    Unauthorized(Option<ErrorResponse>),
    // some variants omitted
}

Principal error type.

An Error specifies an error originating from or propagated by the couchdb crate.

Error variants with a value of the type Option<ErrorResponse> signify error responses from the CouchDB server. The value for these variants is None if the request causing the error was a HEAD request, and Some otherwise. This reflects how the server returns no detailed error information for HEAD requests.

Variants

BadDatabasePath

The database path is in an invalid format.

BadDesignDocumentPath

The design document path is in an invalid format.

BadDocumentPath

The document path is in an invalid format.

BadRequest

The client request is invalid.

BadRevision

The revision is in an invalid format.

BadUuid

The UUID is in an invalid format.

BadViewPath

The view path is in an invalid format.

DatabaseExists

The database already exists.

DocumentConflict

The client request conflicts with an existing document.

InternalServerError

An internal server error occurred.

NotFound

The resource does not exist.

In case of a HEAD request, the response value is None (because the server doesn't send response content for HEAD requests). For all other request methods, the response value is Some.

Unauthorized

The client is unauthorized to carry out the operation.

In case of a HEAD request, the response value is None (because the server doesn't send response content for HEAD requests). For all other request methods, the response value is Some.

Trait Implementations

impl Error for Error

fn description(&self) -> &str

fn cause(&self) -> Option<&Error>

impl Display for Error

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

Derived Implementations

impl Debug for Error

fn fmt(&self, __arg_0: &mut Formatter) -> Result