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

Commit

Permalink
Merge pull request #313 from lzpap/promote_fix
Browse files Browse the repository at this point in the history
Fix error message in `PromoteTransactionCommand`
  • Loading branch information
lzpap committed Feb 27, 2020
2 parents 29cf906 + daacbd6 commit 0f15772
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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

0 comments on commit 0f15772

Please sign in to comment.