fresh icon indicating copy to clipboard operation
fresh copied to clipboard

Manually invoke 404 page

Open byhemechi opened this issue 2 years ago • 1 comments

As far as i can tell, there's no (documented) way of returning the global 404 page from a handler.

This is pretty much entirely an issue with dynamic routes, as the only way to have a not found page when the route matches is to return the default export from _404.tsx in the route's component while wrapping ctx.render with another response whose status is 200

byhemechi avatar Jul 09 '22 09:07 byhemechi

Seems like there is already PR for that #481.

harrel56 avatar Jul 09 '22 10:07 harrel56

Fixed by https://github.com/denoland/fresh/pull/481.

lucacasonato avatar Aug 09 '22 20:08 lucacasonato