We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c2e848 commit cd6d3e3Copy full SHA for cd6d3e3
modules/sdk-core/src/bitgo/wallet/wallet.ts
@@ -2200,7 +2200,15 @@ export class Wallet implements IWallet {
2200
PrebuildTransactionResult
2201
];
2202
} catch (err) {
2203
- throw new Error(`Failed to process transaction: ${err.message}`);
+ if (err !== null || (err instanceof Error && err.message.includes('unable to decrypt keychain'))) {
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;
2209
+ } else {
2210
+ throw new Error(`Failed to process transaction: ${err.message}`);
2211
+ }
2212
}
2213
try {
2214
await this.baseCoin.verifyTransaction({
0 commit comments