Merged
Conversation
🦋 Changeset detectedLatest commit: da6d43a The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
matthewp
approved these changes
Jul 21, 2023
ematipico
approved these changes
Jul 22, 2023
Member
ematipico
left a comment
There was a problem hiding this comment.
I like this approach a lot. Great refactor!
ddbdf29 to
896a5e8
Compare
natemoo-re
commented
Jul 24, 2023
Member
Author
natemoo-re
left a comment
There was a problem hiding this comment.
A few updates! Moved some tests around, added a couple small fixes
1 task
a753333 to
70bb342
Compare
ematipico
reviewed
Aug 1, 2023
Comment on lines
+268
to
+269
| * If is a known error code, try sending the according page (e.g. 404.astro / 500.astro). | ||
| * This also handles pre-rendered /404 or /500 routes |
Member
There was a problem hiding this comment.
Suggested change
| * If is a known error code, try sending the according page (e.g. 404.astro / 500.astro). | |
| * This also handles pre-rendered /404 or /500 routes | |
| * If it is a known error code, try sending the according page (e.g. 404.astro / 500.astro). | |
| * This also handles pre-rendered /404 or /500 routes |
| const { status, statusText, headers } = oldResponse; | ||
|
|
||
| return new Response(newResponse.body, { | ||
| status: status === 200 ? newResponse.status : status, |
Member
There was a problem hiding this comment.
This is weird; why do we return newRespnose.status if we check the original staus? Can you add a comment?
Member
|
@natemoo-re I left some feedback, could you please address it? |
natemoo-re
added a commit
that referenced
this pull request
Aug 1, 2023
natemoo-re
added a commit
that referenced
this pull request
Aug 1, 2023
1 task
This was referenced Nov 14, 2023
ematipico
pushed a commit
that referenced
this pull request
Feb 5, 2025
* fix(app): refactor 404 and 500 approach * chore: refactor logic * fix: always treat error as page * test: migrate ssr-prerender-404 to node adapter * feat: merge original response metadata with error response * chore: update lockfile * chore: trigger ci * chore(lint): fix lint issue * fix: ensure merged request has proper status * fix(node): prerender test * chore: update test label * fix(node): improve 404 behavior in middleware mode * fix(vercel): improve 404 behavior * fix(netlify): improve 404 behavior * chore: update test labels * chore: force ci * chore: fix lint * fix: avoid infinite loops * test: fix failing test in Node 18 * chore: remove volta
ematipico
pushed a commit
that referenced
this pull request
Feb 5, 2025
* fix(app): refactor 404 and 500 approach * chore: refactor logic * fix: always treat error as page * test: migrate ssr-prerender-404 to node adapter * feat: merge original response metadata with error response * chore: update lockfile * chore: trigger ci * chore(lint): fix lint issue * fix: ensure merged request has proper status * fix(node): prerender test * chore: update test label * fix(node): improve 404 behavior in middleware mode * fix(vercel): improve 404 behavior * fix(netlify): improve 404 behavior * chore: update test labels * chore: force ci * chore: fix lint * fix: avoid infinite loops * test: fix failing test in Node 18 * chore: remove volta
ematipico
pushed a commit
that referenced
this pull request
Feb 6, 2025
* fix(app): refactor 404 and 500 approach * chore: refactor logic * fix: always treat error as page * test: migrate ssr-prerender-404 to node adapter * feat: merge original response metadata with error response * chore: update lockfile * chore: trigger ci * chore(lint): fix lint issue * fix: ensure merged request has proper status * fix(node): prerender test * chore: update test label * fix(node): improve 404 behavior in middleware mode * fix(vercel): improve 404 behavior * fix(netlify): improve 404 behavior * chore: update test labels * chore: force ci * chore: fix lint * fix: avoid infinite loops * test: fix failing test in Node 18 * chore: remove volta
ematipico
pushed a commit
that referenced
this pull request
Feb 6, 2025
* fix(app): refactor 404 and 500 approach * chore: refactor logic * fix: always treat error as page * test: migrate ssr-prerender-404 to node adapter * feat: merge original response metadata with error response * chore: update lockfile * chore: trigger ci * chore(lint): fix lint issue * fix: ensure merged request has proper status * fix(node): prerender test * chore: update test label * fix(node): improve 404 behavior in middleware mode * fix(vercel): improve 404 behavior * fix(netlify): improve 404 behavior * chore: update test labels * chore: force ci * chore: fix lint * fix: avoid infinite loops * test: fix failing test in Node 18 * chore: remove volta
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.
Changes
appto handle404and500routes more consistently404and500pages by making a new request to the origin serverTesting
Tests updated!
Docs
N/A