fix(signer): throw error instead of returning in sendRequestToSubAccountSigner#333
Open
faisalnugroho wants to merge 1 commit into
Open
fix(signer): throw error instead of returning in sendRequestToSubAccountSigner#333faisalnugroho wants to merge 1 commit into
faisalnugroho wants to merge 1 commit into
Conversation
…untSigner The catch block in sendRequestToSubAccountSigner used 'return' instead of 'throw' when handleAddSubAccountOwner failed. This caused the Error object to be silently returned as a value instead of propagating the error to the caller, masking sub-account owner addition failures. Closes base#326
Collaborator
🟡 Heimdall Review Status
|
Author
|
Hi! Following up on this bug fix PR. This PR fixes a silent-failure bug where sendRequestToSubAccountSigner returns undefined instead of throwing when the signer callback fails. The silent return causes downstream code to proceed with a null signer, leading to confusing errors. Happy to adjust based on your feedback. All CI checks pass (StepSecurity ✅). Would love to get your review when you have a moment. Thanks! |
Author
|
Hi! I'd love to get this PR reviewed when you have a moment. This PR addresses throw error instead of returning in sendRequestToSubAccountSigner. Happy to make any adjustments based on your feedback. Thank you! |
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.
Summary
The catch block in
sendRequestToSubAccountSigner(Signer.ts:789-798) usesreturninstead ofthrowwhenhandleAddSubAccountOwnerfails. This causes the Error object to be silently returned as a value instead of propagating the error to the caller.Impact: Sub-account owner addition failures are silently swallowed, making it appear the operation succeeded when it actually failed.
Fix
Changed
return standardErrors.provider.unauthorized(...)tothrow standardErrors.provider.unauthorized(...)to properly propagate the error.Test Plan
Closes #326