Skip to content

fix(sub-account): throw instead of return Error in sendRequestToSubAccountSigner catch block#328

Open
Nexory wants to merge 2 commits into
base:masterfrom
Nexory:fix/subaccount-throw-not-return
Open

fix(sub-account): throw instead of return Error in sendRequestToSubAccountSigner catch block#328
Nexory wants to merge 2 commits into
base:masterfrom
Nexory:fix/subaccount-throw-not-return

Conversation

@Nexory
Copy link
Copy Markdown

@Nexory Nexory commented May 29, 2026

Closes #326

Catch block returns Error instead of throwing — Issue #326

The diff is a 1-line behavioral fix. See Issue #326 for the full rationale.

…countSigner catch block

The catch block previously did `return new Error(...)` which causes
the async function's Promise to resolve with the Error as a value
rather than reject. The caller's .catch() never fires, the Error is
silently swallowed downstream, and the calling code can mistakenly
proceed as if the operation succeeded (the caller would need to
instanceof-check the resolved value to detect the failure).

This patch throws so the Promise rejects properly and the caller's
error-handling path executes.

Closes base#326
@cb-heimdall
Copy link
Copy Markdown
Collaborator

cb-heimdall commented May 29, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sendRequestToSubAccountSigner silently returns Error object instead of throwing when handleAddSubAccountOwner fails

2 participants