Skip to content

fix(web): show custom 500 page on CMS errors instead of blank page#44

Merged
jhb-dev merged 1 commit into
mainfrom
claude/custom-http-500-page-uyiezq
Jun 30, 2026
Merged

fix(web): show custom 500 page on CMS errors instead of blank page#44
jhb-dev merged 1 commit into
mainfrom
claude/custom-http-500-page-uyiezq

Conversation

@jhb-dev

@jhb-dev jhb-dev commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

The page data was fetched inside CollectionLayout, i.e. while the SSR
response was already streaming. A CMS error thrown at that point could no
longer switch Astro to the custom 500 page, so visitors got a blank page
with HTTP 200.

Move the getPageData call up into the page route frontmatter (before the
response starts streaming) and pass the result down as a prop, so a CMS
error surfaces as the custom 500 page with HTTP 500.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01YF1wMNs82v8QuQDSW17xG8

The page data was fetched inside CollectionLayout, i.e. while the SSR
response was already streaming. A CMS error thrown at that point could no
longer switch Astro to the custom 500 page, so visitors got a blank page
with HTTP 200.

Move the getPageData call up into the page route frontmatter (before the
response starts streaming) and pass the result down as a prop, so a CMS
error surfaces as the custom 500 page with HTTP 500.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YF1wMNs82v8QuQDSW17xG8
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
website Ignored Ignored Jun 30, 2026 9:02pm
website-cms Ignored Ignored Jun 30, 2026 9:02pm

Request Review

@jhb-dev
jhb-dev merged commit 5d44cc3 into main Jun 30, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants