Skip to content

fetch: report early rejections as unhandled rejections - #37434

Open
robobun wants to merge 4 commits into
mainfrom
farm/ac18be49/fetch-rejections-notify-vm
Open

fetch: report early rejections as unhandled rejections#37434
robobun wants to merge 4 commits into
mainfrom
farm/ac18be49/fetch-rejections-notify-vm

test: handling an early fetch rejection must not emit rejectionHandled

b2f5d46
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 11, 2026 in 21m 32s

Code review found 1 potential issue

Found 2 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/js/bun/http/fetch-file-upload.test.ts:237 GC regression test no longer collects the promises it was written to exercise

Annotations

Check warning on line 237 in test/js/bun/http/fetch-file-upload.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

GC regression test no longer collects the promises it was written to exercise

The trailing `Bun.gc(true)` no longer collects the 1000 rejected promises this loop was written to stress: `rejected_promise` now appends each promise to `m_aboutToBeNotifiedRejectedPromises` (a GC root), and `.rejects.toThrow()` only calls `markAsHandled()` without draining that list, so all 1000 are still pinned when the forced GC runs. Insert an `await 1;` before this `Bun.gc(true)` so `handleRejectedPromises()` clears the tracker first and the GC safety net still bites.