diff options
author | John Christopher Anderson <jchris@apache.org> | 2010-08-13 23:52:24 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2010-08-13 23:52:24 +0000 |
commit | 9f78585f624d154579cb648d6e7b6298e994fee9 (patch) | |
tree | 96c3f8ac36eb2fe9c9f684f1c2bf78068c5eaadd | |
parent | 0007600289cec3615324289af3ddcdf2c69ff1cb (diff) |
more informative error messages on invalid json
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@985407 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/couchdb/couch_httpd.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index 0aa77c16..448cd432 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -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"}); |