From ec0f91942da11a6c28c6867a1ea0d8e63d510ca7 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Sat, 14 Nov 2020 19:59:59 +0100 Subject: [PATCH] daemon: fix local RPC server error messages to conform to jsonrpc spec fixes #6672 --- electrum/daemon.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/electrum/daemon.py b/electrum/daemon.py index 40dc25949..d893dda04 100644 --- a/electrum/daemon.py +++ b/electrum/daemon.py @@ -207,7 +207,10 @@ class AuthenticatedServer(Logger): response['result'] = await f(*params) except BaseException as e: self.logger.exception("internal error while executing RPC") - response['error'] = str(e) + response['error'] = { + 'code': 1, + 'message': str(e), + } return web.json_response(response)