Merge pull request #4177

e7c0fcd epee: set jsonrpc to '2.0' in parse error return data (moneromooo-monero)
This commit is contained in:
luigi1111 2018-08-15 17:42:09 -05:00
commit 0415863747
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -122,6 +122,7 @@
if(!ps.load_from_json(query_info.m_body)) \ if(!ps.load_from_json(query_info.m_body)) \
{ \ { \
boost::value_initialized<epee::json_rpc::error_response> rsp; \ boost::value_initialized<epee::json_rpc::error_response> rsp; \
static_cast<epee::json_rpc::error_response&>(rsp).jsonrpc = "2.0"; \
static_cast<epee::json_rpc::error_response&>(rsp).error.code = -32700; \ static_cast<epee::json_rpc::error_response&>(rsp).error.code = -32700; \
static_cast<epee::json_rpc::error_response&>(rsp).error.message = "Parse error"; \ static_cast<epee::json_rpc::error_response&>(rsp).error.message = "Parse error"; \
epee::serialization::store_t_to_json(static_cast<epee::json_rpc::error_response&>(rsp), response_info.m_body); \ epee::serialization::store_t_to_json(static_cast<epee::json_rpc::error_response&>(rsp), response_info.m_body); \