Better error messages for out of range integral values

* This change passes detailed error messages from the JSON parser
  on the server side, back to the client for inclusion into the
  reply's error message.

* Errors originating from the server's inability to parse are
  reclassified from rpcINTERNAL to rpcINVALID_PARAMS.
This commit is contained in:
Howard Hinnant
2018-01-17 17:48:58 -05:00
committed by seelabs
parent 35cc341544
commit a8481e369d
4 changed files with 34 additions and 3 deletions

View File

@@ -893,7 +893,7 @@ class ServerStatus_test :
boost::beast::http::response<boost::beast::http::string_body> resp;
doHTTPRequest(env, yield, false, resp, ec, "{}");
BEAST_EXPECT(resp.result() == boost::beast::http::status::bad_request);
BEAST_EXPECT(resp.body() == "Unable to parse request\r\n");
BEAST_EXPECT(resp.body() == "Unable to parse request: \r\n");
}
Json::Value jv;