File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ namespace jsonrpccxx {
59
59
json response = json::parse (connector.Send (j.dump ()));
60
60
if (has_key_type (response, " error" , json::value_t ::object)) {
61
61
throw JsonRpcException::fromJson (response[" error" ]);
62
+ } else if (has_key_type (response, " error" , json::value_t ::string)) {
63
+ throw JsonRpcException (-32603 , response[" error" ]);
62
64
}
63
65
if (has_key (response, " result" ) && has_key (response, " id" )) {
64
66
if (response[" id" ].type () == json::value_t ::string)
Original file line number Diff line number Diff line change 1
1
#pragma once
2
- #include " common.hpp"
3
2
#include " nlohmann/json.hpp"
4
3
#include < exception>
5
4
#include < string>
@@ -46,4 +45,4 @@ namespace jsonrpccxx {
46
45
json data;
47
46
std::string err;
48
47
};
49
- } // namespace jsonrpccxx
48
+ } // namespace jsonrpccxx
You can’t perform that action at this time.
0 commit comments