How can I set HTTP response code during SSR?
When I throw errors in root loader, it still returns 200, though it shows my error component properly. "setResponseCode" seems to not change anything. Throwing "notFound()" and "redirect()" seems to work for their respective purposes, but I want a 500 error page (or any arbitrary status code page).
3 Replies
rival-black•2mo ago
Are you using the "useServerFunction" hook?
generous-apricotOP•2mo ago
In the route's loader() I didn't think it was needed, though I can try it in a bit.
rival-black•2mo ago
I am sorry, I missed this detail