Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Fix error message in PromoteTransactionCommand #313

Merged
merged 2 commits into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion iota/commands/extended/promote_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async def _execute(self, request):
if cc_response['state'] is False:
raise BadApiResponse(
'Transaction {transaction} is not promotable. '
'You should reattach first.'.format(transaction=transaction)
'Info: {reason}'.format(transaction=transaction, reason=cc_response['info'])
)

spam_transfer = ProposedTransaction(
Expand Down
1 change: 1 addition & 0 deletions test/commands/extended/promote_transaction_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ async def test_not_promotable(self):

self.adapter.seed_response('checkConsistency', {
'state': False,
'info': 'Something went terribly wrong.',
})

with self.assertRaises(BadApiResponse):
Expand Down