Allow "NotFound" routes to passthrough to other Express middleware #6883
AndrewLeedham
started this conversation in
Proposals
Replies: 0 comments
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.
-
Currently when using the Express adapter it consumes all requests that get to it, whether they match or not. If you want to handle 404's in Remix this is great.
However, when integrating as part of an existing Express app, you may not necessarily want this behaviour. Including Remix as the last route in the chain may not be possible or ideal.
For example, we have some expensive routes that slow things down, and matching known Remix routes first would be beneficial. Additionally, we have some proxies that allow things to fall-through to other platforms in certain cases.
Potential Solution
Adding an option to
createRequestHandler
that allows errors to fall-through would be ideal. Something like:One thing I am not sure of how to handle is error boundaries, should this only apply if we get to the Root Error Boundary?
Beta Was this translation helpful? Give feedback.
All reactions