Replies: 1 comment 1 reply
-
That's an edge case that Remix doesn't handle. I would just export a loader that returns 404. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, when I have a route that only defines an
action
e.g. an api only route, how do properly respond with a 404 to GET requests?I could define a loader that returns the 404, but I was wondering if there's also a way to override the default error raising logic to just respond with a 404 when an
action
only route received a GET. The only way I see of doing this is by performing a regex match on the error message inhandleError
inentry.server
and returning a 404 if it matchesbut did not provide a
loaderfor route
.Beta Was this translation helpful? Give feedback.
All reactions