mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #492] [MERGED] fix: call reportRequestError in Pages Router prod entry #614
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#614
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/492
Author: @NathanDrake2406
Created: 3/12/2026
Status: ✅ Merged
Merged: 3/12/2026
Merged by: @james-elicx
Base:
main← Head:fix/pages-router-prod-report-request-error📝 Commits (2)
e1cfb1bfix: call reportRequestError in Pages Router prod entry6305a84fix: use original URL path in SSR error report, not locale-stripped📊 Changes
3 files changed (+32 additions, -0 deletions)
View changed files
📝
packages/vinext/src/entries/pages-server-entry.ts(+11 -0)📝
tests/__snapshots__/entry-templates.test.ts.snap(+11 -0)📝
tests/entry-templates.test.ts(+10 -0)📄 Description
Summary
pages-server-entry.ts) was missingreportRequestError()calls in the SSR and API catch blocksdev-server.ts,api-handler.ts) and App Router prod (app-rsc-entry.ts) both report errors via the instrumentation hook, but Pages Router prod only logged to console and returned 500onRequestErrorsilently stopped firing in Pages Router productionAdds
_reportRequestError()calls to both catch blocks with the same{path, method, headers}request shape and{routerKind, routePath, routeType}context shape as dev, with.catch()to swallow reporter errors (matching dev behavior).Test plan
entry-templates.test.tsthat generated server entry containsreportRequestErrorwith correct route types ("render"for SSR,"route"for API)tests/instrumentation.test.tspasses (177 tests)tests/pages-router.test.tspasses🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.