couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject couch commit: updated refs/heads/master to 9d4b0fe
Date Mon, 07 Sep 2015 12:44:01 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/master d1dd5d67e -> 9d4b0fe72


Convert compilation error to 400 Bad Request

COUCHDB-2772


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/9d4b0fe7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/9d4b0fe7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/9d4b0fe7

Branch: refs/heads/master
Commit: 9d4b0fe7272caa69722d4637f9fa43dc8aa4d777
Parents: d1dd5d6
Author: Robert Newson <rnewson@apache.org>
Authored: Mon Sep 7 13:05:47 2015 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Mon Sep 7 13:05:47 2015 +0100

----------------------------------------------------------------------
 src/couch_db.erl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/9d4b0fe7/src/couch_db.erl
----------------------------------------------------------------------
diff --git a/src/couch_db.erl b/src/couch_db.erl
index b07dd6a..6f767d9 100644
--- a/src/couch_db.erl
+++ b/src/couch_db.erl
@@ -604,10 +604,12 @@ validate_doc_update(Db, Doc, GetDiskDocFun) ->
 
 validate_ddoc(DbName, DDoc) ->
     try
-        couch_index_server:validate(DbName, couch_doc:with_ejson_body(DDoc))
+        ok = couch_index_server:validate(DbName, couch_doc:with_ejson_body(DDoc))
     catch
         throw:{invalid_design_doc, Reason} ->
             {bad_request, invalid_design_doc, Reason};
+        throw:{compilation_error, Reason} ->
+            {bad_request, compilation_error, Reason};
         throw:Error ->
             Error
     end.


Mime
View raw message