You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Gatsby resolves a fake "404"-Route, but only in development. The user gets confused by this as one might think this route will also show in production. That will never happen though, because the server won't find the page and therefore it wil return a real 404 status code.
My suggestion would be to remove this fake 404 page from development mode and instead show a proper error, since a link to a non-existant page is a proper error.
Here are two images from my blog to show you what I am talking about:
Development
Production:
The text was updated successfully, but these errors were encountered:
Big 👍 to this! The development environment and production environment should be as consistent as possible so the current behavior is definitely wrong. Thanks for bringing this up!
This would be an easy first PR for someone — in the development server we have a list of all the pages
@Algram@KyleAMathews is this not dependent on server routing configuration? The 404 page loads the same for both development and production on my blog.
Also @KyleAMathews you propose changing the develop.js file to return a 404 page, but in the example above @Algram shows the 404 page loading just fine for development. What behavior does your recommended change create?
Currently Gatsby resolves a fake "404"-Route, but only in development. The user gets confused by this as one might think this route will also show in production. That will never happen though, because the server won't find the page and therefore it wil return a real 404 status code.
My suggestion would be to remove this fake 404 page from development mode and instead show a proper error, since a link to a non-existant page is a proper error.
Here are two images from my blog to show you what I am talking about:
Development
Production:
The text was updated successfully, but these errors were encountered: