How to Add a Catch-All Error Handler Middleware in createServerFileRoute?
I'm using createServerFileRoute to define my server routes. I want to implement a catch-all error handler middleware that logs errors to the console and returns a 500 status code for any unhandled errors.
In the documentation, I see that middleware can be registered using registerMiddleware, is that only can be used with createServerFn. How can I add a global error handling middleware when using createServerFileRoute?
In the documentation, I see that middleware can be registered using registerMiddleware, is that only can be used with createServerFn. How can I add a global error handling middleware when using createServerFileRoute?