Post-Route Middleware for Logging and Error Handling

Is there any way how specify http middleware that runs after the route handler? I would like to log and blind 500 errors so I don't leak stackTraces to clients.
Was this page helpful?