fix(wallets): throw typed KeyExportError when export-signer TEE call fails#1897
fix(wallets): throw typed KeyExportError when export-signer TEE call fails#1897devin-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:
|
🦋 Changeset detectedLatest commit: 80b56fe The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Reviews (1): Last reviewed commit: "fix(wallets): throw typed KeyExportError..." | Re-trigger Greptile |
Description
When
_exportPrivateKeyreceives an error response from the TEEexport-signercall, it threwnew Error(response.error || "Failed to export private key")— a genericErrorwith no typed class and no error code. Consumers couldn't distinguish a key export failure from any other error.Same masking pattern fixed for OTP validation (#1886) and get-status (#1896). Now
_exportPrivateKeythrows a typedKeyExportError(message, code)that:@crossmint/wallets-sdkso consumers caninstanceof-check itTest plan
Package updates
@crossmint/wallets-sdk— patch changeset added (fix-export-signer-typed-error.md)Link to Devin session: https://crossmint.devinenterprise.com/sessions/7bd8230602444a8a94498384e0aac02d
Requested by: @xmint-guille