feat(astro): add HTTP error pages with shared ErrorPage component - #68
Merged
Conversation
Create a reusable ErrorPage.astro component Implement styled error pages for all relevant HTTP status codes. Refactor the existing 404 page to use the shared component. Pages created: - 400 Bad Request - 403 Forbidden - 404 Not Found (refactored) - 405 Method Not Allowed - 410 Gone - 429 Too Many Requests - 451 Unavailable for Legal Reasons - 500 Internal Server Error - 502 Bad Gateway - 503 Service Unavailable - 504 Gateway Timeout
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a shared error-page component to the Astro SSR app and introduces dedicated routes for common HTTP error codes, refactoring the existing 404 page to use the shared UI.
Changes:
- Added a reusable
ErrorPage.astrocomponent for consistent error-page layout. - Added new status-code pages (400, 403, 405, 410, 429, 451, 500, 502, 503, 504) and refactored
404.astroto use the shared component. - Included an SSR-focused note in
500.astroabout keeping imports minimal for the error boundary page.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/astro/src/components/ErrorPage.astro | New shared component used by all error pages. |
| apps/astro/src/pages/400.astro | New 400 error page using ErrorPage. |
| apps/astro/src/pages/403.astro | New 403 error page using ErrorPage. |
| apps/astro/src/pages/404.astro | Refactors 404 page to use ErrorPage. |
| apps/astro/src/pages/405.astro | New 405 error page using ErrorPage. |
| apps/astro/src/pages/410.astro | New 410 error page using ErrorPage. |
| apps/astro/src/pages/429.astro | New 429 error page using ErrorPage. |
| apps/astro/src/pages/451.astro | New 451 error page using ErrorPage. |
| apps/astro/src/pages/500.astro | New 500 error page using ErrorPage with SSR boundary note. |
| apps/astro/src/pages/502.astro | New 502 error page using ErrorPage. |
| apps/astro/src/pages/503.astro | New 503 error page using ErrorPage. |
| apps/astro/src/pages/504.astro | New 504 error page using ErrorPage. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Create a reusable ErrorPage.astro component
Implement styled error pages for all relevant HTTP status codes.
Refactor the existing 404 page to use the shared component.
Pages created: