mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #947] [MERGED] fix: report stale ISR background revalidation errors via onRequestError #975
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#975
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/947
Author: @Divkix
Created: 4/29/2026
Status: ✅ Merged
Merged: 4/29/2026
Merged by: @james-elicx
Base:
main← Head:fix/775-report-isr-revalidation-errors📝 Commits (3)
4e59483fix: report stale ISR background revalidation errors via onRequestError (#775)7cadb5efix: remove dead ISRRegenErrorContext export flagged by knipbebbe22Merge branch 'origin/main' into fix/775-report-isr-revalidation-errors📊 Changes
9 files changed (+425 additions, -173 deletions)
View changed files
📝
packages/vinext/src/entries/app-rsc-entry.ts(+22 -4)📝
packages/vinext/src/entries/pages-server-entry.ts(+2 -2)📝
packages/vinext/src/server/dev-server.ts(+115 -103)📝
packages/vinext/src/server/isr-cache.ts(+26 -1)📝
packages/vinext/src/server/pages-page-data.ts(+45 -33)📝
tests/__snapshots__/entry-templates.test.ts.snap(+134 -26)📝
tests/app-router.test.ts(+2 -2)📝
tests/entry-templates.test.ts(+6 -2)📝
tests/isr-cache.test.ts(+73 -0)📄 Description
Fixes #775
Summary
onRequestErrorinstrumentation hook (Sentry, OpenTelemetry, etc.) instead of being silently swallowedtriggerBackgroundRegeneration()inisr-cache.tswith optional error context parameterrevalidateReason: "stale", matching Next.js 16 behavior (vercel/next.js#92282)Changes
server/isr-cache.ts: AddedISRRegenErrorContexttype and error reporting in background regen catchentries/app-rsc-entry.ts: Updated inline__triggerBackgroundRegenerationto call_reportRequestErrorentries/pages-server-entry.ts: Forward error context through wrapper functionserver/dev-server.ts: Pass Pages Router route context to regen callsserver/pages-page-data.ts: Pass route context for Pages Router page data regenTest plan
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.