Browse Source
daemon: fix local RPC server error messages to conform to jsonrpc spec
fixes #6672
patch-4
SomberNight
4 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
4 additions and
1 deletions
-
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) |
|
|
|
|
|
|
|
|
|
|
|