Class: CouchError

CouchError

Encapsulates a HTTP response from a CouchDB and provides quick access to
the decoded response body and the status-code for inspection.

new CouchError(response, body)

Create a new CouchError from a given HTTP response and body.

Name Type Description
response Object

The complete response object as returned from
the 'request' library

body String

The raw body of the HTTP response

Extends

  • Error

Members

bodyString

The reaw body of the HTTP response

dataObject Array

The JSON decoded body of the HTTP response

responseObject

The raw response object as returned from 'request'

See:

statusCodeInt

The HTTP Status Code of the HTTP response for fast access and inspection