Handling RouteNotFound Error in Simple Router
I have the following server with a very simple router. If I hit a non-existent route, I get a 500 internal server error instead of the expected 404. Do I, as a user, have to handle the
My intuition says to add
RouteNotFound error? If so, how?My intuition says to add
Http.router.catchTag("RouteNotFound", () => Http.response.empty({ status: 404 })) in the router pipe. But that does not typecheck becaue the Router at that point is a Router<never, never>. Any tips?