FAQ
Request lifecycle
What happens to a request, in order.
Loading diagram…
- Middleware (global, then for the matching routes) sees every request, even a 404.
- Guards (global, controller, handler) allow or refuse.
- Interceptors (global, controller, handler) run before the handler.
- Pipes transform and validate each bound parameter.
- The handler runs on a virtual thread (or the I/O thread when
@NonBlocking). - Interceptors see the result on the way out.
- An exception anywhere goes to the exception filters (handler, controller, global), then controller advice, then the default JSON error.
Loading diagram…
The same pipeline pieces (guards, interceptors, pipes, filters) also wrap microservice, WebSocket and gRPC handlers.