Class

DecafRequestHandlerInterceptor

DecafRequestHandlerInterceptor()

Constructor

# new DecafRequestHandlerInterceptor()

The DecafRequestHandlerInterceptor integrates the Decaf request-handling pipeline into NestJS' interceptor mechanism. Before passing execution to the next handler in the NestJS chain, it delegates request processing to the DecafHandlerExecutor, which sequentially runs all registered DecafRequestHandler instances. This allows behaviors such as authentication, logging, tenant resolution, or metadata enrichment to occur prior to controller execution.

Interceptor responsible for executing all registered Decaf request handlers before the controller method is invoked.

sequenceDiagram participant Client participant Interceptor participant Executor participant Controller Client->>Interceptor: HTTP Request Interceptor->>Executor: exec(request) Executor-->>Interceptor: handlers completed Interceptor->>Controller: next.handle() Controller-->>Client: Response

View Source interceptors/DecafRequestHandlerInterceptor.ts, line 14

Example
```ts
// Apply globally:
app.useGlobalInterceptors(new DecafRequestHandlerInterceptor(executor));

// Or in a module: