-
Notifications
You must be signed in to change notification settings - Fork 233
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
Wrong http status code (500) returned instead of 404 or any response thrown from a loader. #145
Comments
Minimal reproduction here: https://stackblitz.com/edit/node-zxrwpd |
One thing that solves the issue is to remove the eslint |
This is an intended behavior in production, see Matt's answer here: remix-run/remix#5115 (comment) |
I don't think that this is the same issue. |
The issue does not happen when not using |
This looks like an issue with the bundling approach causing multiple disparate |
The above merged PR will go in the next react router release, either 6.7.1 or 6.8.0 depending on what is in it. Then Remix will pick that up in it's next release. |
Thanks for the quick fix! |
This should be fixed with Remix |
Have you experienced this bug with the latest version of the template?
yes
Steps to Reproduce
npx create-remix@latest
;500
instead of404
The same issue happens if you throw a json response in a loader:
throw json("Unauthorized", { status: 403 });
, a 500 status code will be returned to the browser.It seems like this started happening when updating remix from
1.9.0
to1.10.0
.The issue does not happen when using
remix serve
instead ofexpress
.I don't know if the issue comes from the template
server.ts
file or from the combination of@remix-run/react
and@remix-run/express
Expected Behavior
A 404 http status code should be returned.
Actual Behavior
A 500 http status code is returned.
The text was updated successfully, but these errors were encountered: