From 07c9b7d19e6fc6eb995ca76cea024315cbd623ef Mon Sep 17 00:00:00 2001 From: Sergi Delgado Segura Date: Fri, 17 Jan 2020 17:46:14 +0100 Subject: [PATCH] Updates error message for `RPC_VERIFY_REJECTED` rpc error. --- pisa/carrier.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pisa/carrier.py b/pisa/carrier.py index d4029d4..00602e9 100644 --- a/pisa/carrier.py +++ b/pisa/carrier.py @@ -63,8 +63,8 @@ class Carrier: # Since we're pushing a raw transaction to the network we can face several rejections if errno == RPC_VERIFY_REJECTED: # DISCUSS: 37-transaction-rejection - # TODO: UNKNOWN_JSON_RPC_EXCEPTION is not the proper exception here. This is long due. - receipt = Receipt(delivered=False, reason=UNKNOWN_JSON_RPC_EXCEPTION) + receipt = Receipt(delivered=False, reason=RPC_VERIFY_REJECTED) + logger.error("Transaction couldn't be broadcast", error=e.error) elif errno == RPC_VERIFY_ERROR: # DISCUSS: 37-transaction-rejection