Skip to content

HTTP error detection #49

@lperrinfano

Description

@lperrinfano

The code (near line 232) that detects CouchDB HTTP errors seems dangerous to me:

          if ('error' in json) {
            cbFired = true;
            return cb && cb(json);
          }

If I save a document with an 'error' attribute, node-couchdb will raise an error every time I fetch it. You should rely on the HTTP status code instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions