From 2ee685d5a937a287451a344b02d89054cafe51cb Mon Sep 17 00:00:00 2001 From: ekzyis Date: Wed, 16 Jul 2025 20:25:31 +0200 Subject: [PATCH] Prettier error message on OperationError (#2285) --- wallets/client/hooks/query.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wallets/client/hooks/query.js b/wallets/client/hooks/query.js index 177bcf3e..9d2328f4 100644 --- a/wallets/client/hooks/query.js +++ b/wallets/client/hooks/query.js @@ -56,7 +56,8 @@ export function useWalletsQuery () { .catch(err => { console.error('failed to decrypt wallets:', err) setWallets([]) - setError(new Error('decryption error: ' + err.message)) + // OperationError from the Web Crypto API does not have a message + setError(new Error('decryption error: ' + (err.message || err.name))) }) }, [query.data, decryptWallet, ready])