Skip to content
PackagesFoundationDocs 1.3.x

@connectum/interceptors ​

ConnectRPC middleware for errors, validation, timeouts, resilience, logging, serialization, and method routing.

Install ​

bash
npm install @connectum/interceptors
bash
pnpm add @connectum/interceptors
bash
bun add @connectum/interceptors

Peer dependencies: @connectum/core, @bufbuild/protobuf ^2.16.0 and @connectrpc/connect ^2.2.0, shared with your application. npm 7+, pnpm and Bun install missing peers automatically; on Yarn, add them yourself — see Peer dependencies on protobuf and Connect. The validation engine, @bufbuild/protovalidate, is a regular dependency and needs no separate install.

Start Here ​

typescript
import { createDefaultInterceptors } from '@connectum/interceptors';

const interceptors = createDefaultInterceptors({
  timeout: { duration: 10_000 },
  validation: true,
});

Key Entry Points ​

Entry pointUse it to
createDefaultInterceptorsBuild the ordered default chain; resilience remains opt-in.
createMethodFilterInterceptorApply an interceptor to selected methods.
createErrorHandlerInterceptorNormalize and sanitize handler failures.

Learn / Configure / API Reference ​

Compare all Connectum packages by capability.