summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_rep.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/couchdb/couch_rep.erl')
-rw-r--r--src/couchdb/couch_rep.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_rep.erl b/src/couchdb/couch_rep.erl
index eda62c86..08d4df8f 100644
--- a/src/couchdb/couch_rep.erl
+++ b/src/couchdb/couch_rep.erl
@@ -340,8 +340,8 @@ update_docs(Db, Docs, Options, NewEdits) ->
open_doc(#http_db{uri=DbUrl, headers=Headers}, DocId, Options) ->
[] = Options,
case do_http_request(DbUrl ++ url_encode(DocId), get, Headers) of
- {[{<<"error">>, ErrId}, {<<"reason">>, Reason}]} -> % binaries?
- {list_to_atom(binary_to_list(ErrId)), Reason};
+ {[{<<"error">>, ErrId}, {<<"reason">>, Reason}]} ->
+ {couch_util:to_existing_atom(ErrId), Reason};
Doc ->
{ok, couch_doc:from_json_obj(Doc)}
end;