Skip to content
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

Dynamic pages not found gives 500 #280

Open
sentry-io bot opened this issue Apr 27, 2020 · 1 comment
Open

Dynamic pages not found gives 500 #280

sentry-io bot opened this issue Apr 27, 2020 · 1 comment

Comments

@sentry-io
Copy link

sentry-io bot commented Apr 27, 2020

When navigating to a page with a non-existent slug, f.ex. itdagene.no/info/notvalidslug, the server returns 500. It should give 404.

Sentry Issue: ITDAGENE-WEBAPP-2

Error: 
  File "./lib/ServerError.tsx", line 14, in ServerError
    const error = new Error() as NodeJS.ErrnoException;
  File "./pages/_document.tsx", line 26, in renderPage
    originalRenderPage({
...
(5 additional frame(s) were not displayed)
@LudvigHz LudvigHz changed the title Infopage not found gives 500 Dynamic pages not found gives 500 Jan 21, 2021
@LudvigHz
Copy link
Member

This applies for all dynamic pages, f.ex /jobb/some-nonexisting-joblisting, /stands/nostand.

The problem lies in the ServerError component, which should render a 404 on the server. This error does not apply when rendering on the browser.

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

No branches or pull requests

1 participant