You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cf -> #395 (comment)
When providing wallet id that does not exist on the node (e.g. which was previously deleted) the API returns 404 and appropriate message I couldn't find a wallet with the given id: <walletId>. Although CLI returns the message correctlly, the exit code in such a case is 0 which is somewhat inconsistent. The exit code should be 1.
There are few integration tests that illustrate current behavior:
In #399 I have also modified corresponding integration tests to expect for response code 1 in case the response from the server is faulty. It turned out that the fix also addressed several other cases not mentioned in original bug description:
not enough utxo when posting tx
not enough fee when posting tx
not enough money when posting tx
wrong password when posting tx
The text was updated successfully, but these errors were encountered:
@piotr-iohk My apologies. I hadn't realized that you had already created a PR to address this (PR #399). Feel free to disregard my PR #402 if necessary.
Woops, my bad for not updating the bug... ¯_(ツ)_/¯ (@jonathanknowles - essentially I made the same change as you, plus I've updated integration tests. I suppose you did not do the latter, hence #402 fails on CI)
Context
cf -> #395 (comment)
When providing wallet id that does not exist on the node (e.g. which was previously deleted) the API returns
404
and appropriate messageI couldn't find a wallet with the given id: <walletId>
. Although CLI returns the message correctlly, the exit code in such a case is0
which is somewhat inconsistent. The exit code should be1
.There are few integration tests that illustrate current behavior:
https://github.com/input-output-hk/cardano-wallet/blob/master/lib/http-bridge/test/integration/Test/Integration/Scenario/CLI/Wallets.hs#L107-L121
https://github.com/input-output-hk/cardano-wallet/blob/master/lib/http-bridge/test/integration/Test/Integration/Scenario/CLI/Transactions.hs#L389-L408
Steps to Reproduce
Run one of the commands
cardano-wallet wallet get 1111111111111111111111111111111111111111
cardano-wallet wallet delete 1111111111111111111111111111111111111111
cardano-wallet wallet update 1111111111111111111111111111111111111111 --name "asdf"
cardano-wallet transaction create 1111111111111111111111111111111111111111 --payment 22@2cWKMJemoBahmFD6eqM76PqSVxxbobW4QbnF2ApBbR1c7JcrEhyq8S8YSrweZJPGGBcoY
And then
Expected behavior
Output of the
echo
command should be1
Actual behavior
Output is
0
Resolution Plan
PR
develop
develop
QA
In #399 I have also modified corresponding integration tests to expect for response code
1
in case the response from the server is faulty. It turned out that the fix also addressed several other cases not mentioned in original bug description:The text was updated successfully, but these errors were encountered: