@connectum/interceptors
ConnectRPC middleware for errors, validation, timeouts, resilience, logging, serialization, and method routing.
Install
bash
npm install @connectum/interceptorsbash
pnpm add @connectum/interceptorsbash
bun add @connectum/interceptorsPeer 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 point | Use it to |
|---|---|
createDefaultInterceptors | Build the ordered default chain; resilience remains opt-in. |
createMethodFilterInterceptor | Apply an interceptor to selected methods. |
createErrorHandlerInterceptor | Normalize and sanitize handler failures. |
Learn / Configure / API Reference
- Learn: Focused guide
- Configure: Task and configuration guidance
- API reference: Exact options and symbols
- Package API index: Generated TypeDoc
- Source: @connectum/interceptors on GitHub
Related Modules
Compare all Connectum packages by capability.