diff options
author | Jan Lehnardt <jan@apache.org> | 2010-02-04 23:09:06 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2010-02-04 23:09:06 +0000 |
commit | ff1618779bc85d8f16d6aeebec461fad51b008c5 (patch) | |
tree | 253733cda59e10beb486b4903d43f21f795d227c /share/server | |
parent | a75bc7b281952eed8dda9e0c09e3fe386bbe9f32 (diff) |
re-enable 404 handling in show functions while retaining user-friendly error behaviour
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@906721 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/server')
-rw-r--r-- | share/server/render.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/share/server/render.js b/share/server/render.js index 45782d76..11c76373 100644 --- a/share/server/render.js +++ b/share/server/render.js @@ -227,7 +227,11 @@ var Render = (function() { throw(["error", "render_error", "undefined response from show function"]); } } catch(e) { - renderError(e, fun.toSource()); + if(args[0] === null) { + throw(["error", "not_found", "document not found"]); + } else { + renderError(e, fun.toSource()); + } } }; |