Improve error handle for Ledger devices#718
Conversation
|
cc: @Sjors |
|
@bigspider is there a complete list of (Bitcoin app) error codes published somewhere? |
This mapping is currently as good as it gets. The |
|
ACK 0d5412a |
|
0x5515 is what I get when the app is in screensaver mode (Ledger Nano X, BTC app 2.1.3) |
Indeed, that situation used to be managed by the app directly, while now it's handled in the app sdk, so the error code changed. I'll add the error code to the client libraries, thanks! |
Discovered it while reviewing #bitcoin/24313. The
ledger_exceptionfunction was not dealing withApduExceptionexceptions. It's basically similar toBTChipExceptionand we can use its "error code" to return friendly error messages.e.g for
displayaddress:before:
{"error": "Exception: invalid status 0x6985", "code": -13}after:
{"error": "display_singlesig_address canceled", "code": -14}