Skip to content

Commit

Permalink
Revert "Make 404 responses compatible with CouchDB API"
Browse files Browse the repository at this point in the history
This reverts commit dabf5e1.

See discussion in #57
  • Loading branch information
rlidwka committed Mar 29, 2014
1 parent 7967d58 commit 4b06026
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,7 @@ module.exports = function(config_hash) {
if (err.status && err.status >= 400 && err.status < 600) {
if (calls == 1) {
res.status(err.status)
var body = {error: err.msg || err.message || 'unknown error'};

// Make 404 responses compliant with CouchDB REST API
if (err.status == 404) {
body.reason = body.error
body.error = 'not_found'
}

res.send(body)
res.send({error: err.msg || err.message || 'unknown error'})
}
} else {
Logger.logger.error({err: err}, 'unexpected error: @{!err.message}\n@{err.stack}')
Expand Down

0 comments on commit 4b06026

Please sign in to comment.