summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_doc.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/couchdb/couch_doc.erl b/src/couchdb/couch_doc.erl
index 3e0a8614..db1f2625 100644
--- a/src/couchdb/couch_doc.erl
+++ b/src/couchdb/couch_doc.erl
@@ -145,7 +145,10 @@ from_json_obj({Props}) ->
deleted = proplists:get_value(<<"_deleted">>, Props, false),
body = NewBody,
attachments = Bins
- }.
+ };
+
+from_json_obj(Other) ->
+ throw({invalid_json_object, "Document must be a JSON object"}).
to_doc_info(FullDocInfo) ->
{DocInfo, _Path} = to_doc_info_path(FullDocInfo),