felixge / felixge/node-couchdb
HTTP error detection
Open
- Dominant language
- JavaScript
- Stars
- 363
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Description
The code (near [line 232](https://github.com/felixge/node-couchdb/blob/master/lib/couchdb.js#L232)) that detects CouchDB HTTP errors seems dangerous to me:
``` javascript
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.