mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #374] [MERGED] fix: propagate page generateMetadata errors to error boundary #521
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#521
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/374
Author: @james-elicx
Created: 3/9/2026
Status: ✅ Merged
Merged: 3/9/2026
Merged by: @james-elicx
Base:
j-branch-11← Head:fix/metadata-error-propagation📝 Commits (1)
9077108fix: propagate page generateMetadata errors to error boundary📊 Changes
1 file changed (+14 additions, -6 deletions)
View changed files
📝
packages/vinext/src/server/app-dev-server.ts(+14 -6)📄 Description
Summary
generateMetadata()errors are still swallowed (.catch(() => null)) — a layout failing shouldn't crash the pagegenerateMetadata()errors now propagate out ofbuildPageElement()so the caller routes them to the nearesterror.tsxorglobal-error.tsxboundaryRoot Cause
The parallelisation PR applied
.catch(() => null)to all modules including the page module. This silently swallowed errors thrown bypage.generateMetadata(), preventing the error boundary from being triggered.Fix
Separate layout modules from the page module when resolving metadata/viewport in
buildPageElement():.catch(() => null)— failures are non-fatal.catch()— errors propagate to the caller, which routes toerror.tsx/global-error.tsxTest
The previously failing test now passes:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.