Unauthenticated Request to Non-Existent Route Fails
Let's say you have a router like so:
and assume you have an authentication middleware, then given:
If you make an unauthenticated request to a non-existent route, it fails with a
and assume you have an authentication middleware, then given:
If you make an unauthenticated request to a non-existent route, it fails with a
401 instead of a 404. Is there a way to shuffle the router/middleware around so that RouteNotFound has precedence over the middleware execution?