We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6abaf05 commit a505365Copy full SHA for a505365
src/rpc/model.cpp
@@ -299,15 +299,22 @@ DEFINE_JSON_FROM_TAG(response_t)
299
{
300
const auto& result = instance.error.value();
301
302
- object["error"] =
303
- {
304
- { "code", result.code },
305
- { "message", result.message }
306
- };
307
-
308
if (result.data.has_value())
309
310
- object["data"] = value_from(result.data.value());
+ object["error"] =
+ {
+ { "code", result.code },
+ { "message", result.message },
+ { "data", value_from(result.data.value()) }
+ };
+ }
311
+ else
312
313
314
315
316
+ { "message", result.message }
317
318
}
319
320
else if (instance.jsonrpc == version::v1 ||
0 commit comments