Improve logging errors from tendermint rpc

Signed-off-by: Shahbaz Nazir <shahbaz@bigchaindb.com>
This commit is contained in:
Shahbaz Nazir 2018-09-13 14:04:10 +02:00
parent 241aae335d
commit aa0377dc33

View File

@ -100,7 +100,10 @@ class BigchainDB(object):
error = response.get('error') error = response.get('error')
if error: if error:
return (500, error) status = error.get('status', 500)
message = error.get('message', 'Internal error')
data = error.get('data', '')
return (status, message + ' - ' + data)
result = response['result'] result = response['result']
if mode == self.mode_commit: if mode == self.mode_commit: