Skip to content

Commit c682e7c

Browse files
committed
chore: fix git check fails while error handling
Ticket: CAAS-7
1 parent bbb3faa commit c682e7c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/sdk-core/src/bitgo/wallet/wallet.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2201,7 +2201,11 @@ export class Wallet implements IWallet {
22012201
];
22022202
} catch (err) {
22032203
if (err || (err instanceof Error && err.message.includes('unable to decrypt keychain'))) {
2204-
throw new Error('unable to decrypt keychain with the given wallet passphrase');
2204+
const error: Error & { code?: string } = new Error(
2205+
`unable to decrypt keychain with the given wallet passphrase`
2206+
);
2207+
error.code = 'wallet_passphrase_incorrect';
2208+
throw error;
22052209
} else {
22062210
throw new Error(`Failed to process transaction: ${err.message}`);
22072211
}

0 commit comments

Comments
 (0)