From ff1618779bc85d8f16d6aeebec461fad51b008c5 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Thu, 4 Feb 2010 23:09:06 +0000 Subject: 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 --- share/server/render.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'share/server') 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()); + } } }; -- cgit v1.2.3