Skip to content

fix(web3.js): keep sig-status fallback errs from escaping as unhandled rej - #3936

Merged
amilz merged 1 commit into
v3.xfrom
fix/DEV-1132-signature-status-fallback-rejection
Sep 18, 2026
Merged

amilz merged 1 commit into
v3.xfrom
fix/DEV-1132-signature-status-fallback-rejection

Conversation

@amilz

@amilz amilz commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

confirmTransaction makes a detached getSignatureStatus call after subscription setup as an early-settlement optimization. It had no rejection handler, so a transient transport or JSON-RPC failure surfaced as an unhandled promise rejection, which terminates modern Node processes by default.

The call is only an optimization; the signature subscription and the expiry strategy's final status check already settle the confirmation. Its failure is now caught and ignored.

Test: first getSignatureStatuses rejects, subscription never responds, block height passes lastValidBlockHeight. Asserts no unhandledRejection fires and the transaction still confirms via the expiry path.

Fixes DEV-1132

…unhandled rejections

The detached status read that runs after signature subscription setup
settles had no rejection path, so a transient transport or JSON-RPC
failure surfaced as an unhandled promise rejection, which terminates
modern Node processes. The read is only an early-settlement optimization,
so its failure is now swallowed and confirmation is left to the signature
subscription and the caller's expiry strategy, which already double-check
the signature status before declaring expiry.

Fixes DEV-1132
@amilz amilz self-assigned this Sep 18, 2026
@linear

linear Bot commented Sep 18, 2026

Copy link
Copy Markdown

DEV-1132

@greptile-apps

greptile-apps Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge because the ignored request is optional and all confirmation strategies retain independent settlement paths.

Summary

This PR prevents failures from an optional post-subscription signature-status check from escaping through its detached async task.

  • Catches and ignores fallback status-check failures while leaving subscription and expiry settlement intact.
  • Adds regression coverage for a transient status transport failure followed by successful confirmation through the block-height expiry path.

Reviews (1) · Last reviewed commit: "fix(web3.js): keep signature-status fall..."

@amilz amilz added the 3.x Pertains to the v3.x line on the main branch label Sep 18, 2026

@dev-jodee dev-jodee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error handling: catch transient sig-status fallback errors to prevent unhandled rejections. CI green.

@amilz
amilz merged commit 8d3275e into v3.x Sep 18, 2026
2 checks passed
@amilz
amilz deleted the fix/DEV-1132-signature-status-fallback-rejection branch September 18, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x Pertains to the v3.x line on the main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants