fix(wallets): throw typed InvalidSignerError when removeSigner API call fails#1909
fix(wallets): throw typed InvalidSignerError when removeSigner API call fails#1909devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Original prompt from Guille
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Reviews (1): Last reviewed commit: "fix(wallets): throw typed InvalidSignerE..." | Re-trigger Greptile |
Description
When
removeSignerreceives an error response from the API ("error" in response), it threwnew Error(...)— a genericErrorthat consumers cannot pattern-match by type.This change makes
removeSignerconsistent withaddSignerby throwingInvalidSignerErrorwith:response.messageas the human-readable error messagedetails(machine-inspectable viaCrossmintSDKError.details)Also renames the log key to
wallet.removeSigner.failedfor consistency withwallet.addSigner.failed.Same error-masking pattern fixed for OTP validation (#1886), get-status (#1896), export-signer (#1897), and addSigner chain failure (#1898).
Test plan
Wallet - removeSigner()suite)InvalidSignerErrorfor consistency withaddSignerPackage updates
@crossmint/wallets-sdk— patch changeset added (fix-removesigner-typed-error.md)Link to Devin session: https://crossmint.devinenterprise.com/sessions/7bd8230602444a8a94498384e0aac02d
Requested by: @xmint-guille