fix(abstract-utxo): re-throw non-404 errors in isWalletAddress#9239
Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Draft
fix(abstract-utxo): re-throw non-404 errors in isWalletAddress#9239bitgo-ai-agent-dev[bot] wants to merge 1 commit into
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Conversation
Previously isWalletAddress() caught all exceptions and returned false. This caused network errors, 5xx server responses, and auth failures during cross-chain recovery to silently exclude affected outputs, recovering less than the full wallet balance. Only return false for HTTP 404 (address not in wallet). Re-throw all other errors so callers can surface transient failures rather than silently under-recovering funds. Ticket: T1-3043 Session-Id: 3bc07ea5-d3c9-4f2c-a632-d16bc2290847 Task-Id: fae7a7dd-6b0f-43a1-80f0-e8914b0c57b7
b8a4b7e to
b4b89ab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
isWalletAddress()incrossChainRecovery.tspreviously swallowed all exceptions and returnedfalsefalsefor HTTP 404 (address not found in wallet); all other errors are re-thrownWhy
isWalletAddress()is the authorization check that determines which transaction outputs belong to the walletfalse, excluding affected UTXOs from the recovery transaction and causing users to recover less than their full balanceTest plan
isWalletAddressreturnstruewhen the API responds 200 with address dataisWalletAddressreturnsfalsewhen the API responds 404isWalletAddressre-throws on 503 (server unavailable)isWalletAddressre-throws on 500 (internal server error)isWalletAddressre-throws on 401 (auth failure)@bitgo/abstract-utxounit tests passTicket: T1-3043