Skip to content

Do not display the 404 overlay #12943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
misl-smlz opened this issue Jan 9, 2025 · 5 comments · Fixed by #12980
Closed
1 task

Do not display the 404 overlay #12943

misl-smlz opened this issue Jan 9, 2025 · 5 comments · Fixed by #12980
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) feat: routing Related to Astro routing (scope)

Comments

@misl-smlz
Copy link

misl-smlz commented Jan 9, 2025

Astro Info

Astro                    v5.1.3
Node                     v22.12.0
System                   Linux (x64)
Package Manager          pnpm
Output                   static
Adapter                  @astro-aws/adapter
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

We use SSR with a cms and have a catch-all route ([...path].astro), ask our cms to get the page and render it. If the path is not available, the cms returns a "page not found" component which we display AND return a 404 status code. That works fine on the server but on development we always see the astro 404 overlay (I'm aware of the custom 404, but this is not how we work).

What's the expected result?

The 404 astro overlay should not be displayed in development - our 404 should be displayed.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-amupzgyx?file=src%2Fpages%2F%5B...path%5D.astro

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jan 9, 2025
@ematipico
Copy link
Member

That works fine on the server

Can you please update your reproduction with a valid adapter? (node, I suppose)

@ematipico ematipico added needs repro Issue needs a reproduction needs response Issue needs response from OP labels Jan 9, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Hello @misl-smlz. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro will be closed if they have no activity within 3 days.

@github-actions github-actions bot removed the needs triage Issue needs to be triaged label Jan 9, 2025
@misl-smlz
Copy link
Author

@ematipico Example updated. We use https://github.com/lukeshay/astro-aws as adapter.

@ascorbic ascorbic added - P3: minor bug An edge case that only affects very specific usage (priority) feat: routing Related to Astro routing (scope) and removed needs response Issue needs response from OP needs repro Issue needs a reproduction labels Jan 9, 2025
@darpserj
Copy link

darpserj commented Jan 9, 2025

Hey there! I've checked out the stackblitz and have a small question.

the normal code gets the content to display back from a cms (including a custom 404 page)

What do you exactly mean by this? 😅 A link to an external page, an html response, etc.?

@misl-smlz
Copy link
Author

some content we display as 404 page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) feat: routing Related to Astro routing (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants