Pages router - 404 results returning 200 when prefetched
Unanswered
Bonaparte's Gull posted this in #help-forum
Bonaparte's GullOP
Hello, I am the latest version 14 release.
I have a bunch of links that should be returning a 404.
When I run a local build and test, these links are correctly return a 404 response, and when clicked I correctly go straight to the 404 page.
However, on vercel, the prefetch responses are 200 and when clicking the link you are taken to the dynamic catch all [...slug].js page. And therefore I'm getting a million client side errors. Upon refresh you are taken to the 404 page.
Waaaa? And idea why this could be happening? I'm using the same database content locally and on vercel (preview urls).
I have a bunch of links that should be returning a 404.
When I run a local build and test, these links are correctly return a 404 response, and when clicked I correctly go straight to the 404 page.
However, on vercel, the prefetch responses are 200 and when clicking the link you are taken to the dynamic catch all [...slug].js page. And therefore I'm getting a million client side errors. Upon refresh you are taken to the 404 page.
Waaaa? And idea why this could be happening? I'm using the same database content locally and on vercel (preview urls).
1 Reply
Bonaparte's GullOP