From 4b06026d2e9c66a1aa3d20e2473fcd7d300d73ca Mon Sep 17 00:00:00 2001 From: Alex Kocharin Date: Sat, 29 Mar 2014 01:08:28 +0000 Subject: [PATCH] Revert "Make 404 responses compatible with CouchDB API" This reverts commit dabf5e1c9a7e53f435b89d9e0fbf8e091e7e40e8. See discussion in #57 --- lib/index.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/index.js b/lib/index.js index 19eb81c12..ec25fe62d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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}')