You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by jc...@apache.org on 2010/08/14 01:52:25 UTC
svn commit: r985407 - /couchdb/trunk/src/couchdb/couch_httpd.erl
Author: jchris
Date: Fri Aug 13 23:52:24 2010
New Revision: 985407
URL: http://svn.apache.org/viewvc?rev=985407&view=rev
Log:
more informative error messages on invalid json
Modified:
couchdb/trunk/src/couchdb/couch_httpd.erl
Modified: couchdb/trunk/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=985407&r1=985406&r2=985407&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd.erl Fri Aug 13 23:52:24 2010
@@ -289,7 +289,7 @@ handle_request_int(MochiReq, DefaultFun,
throw:{invalid_json, S} ->
?LOG_ERROR("attempted upload of invalid JSON (set log_level to debug to log it)", []),
?LOG_DEBUG("Invalid JSON: ~p",[S]),
- send_error(HttpReq, {bad_request, "invalid UTF-8 JSON"});
+ send_error(HttpReq, {bad_request, io_lib:format("invalid UTF-8 JSON: ~p",[S])});
throw:unacceptable_encoding ->
?LOG_ERROR("unsupported encoding method for the response", []),
send_error(HttpReq, {not_acceptable, "unsupported encoding"});