Connectum API Reference / @connectum/interceptors / defaults / DefaultInterceptorOptions
Interface: DefaultInterceptorOptions ​
Defined in: defaults.ts:42
Configuration options for the default interceptor chain.
Except for fallback and validation, each interceptor can be:
falseto disable it entirelytrueto enable with default options- An options object to enable with custom configuration
Fallback requires an options object with a handler; boolean values leave it disabled. Validation accepts only a boolean and is enabled unless false.
Only structural interceptors (errorHandler, validation) are enabled by default. Behavioral resilience interceptors (timeout, bulkhead, circuitBreaker, retry) are opt-in: implicitly enabled behavior-altering logic is hidden logic, and hidden logic caused a confirmed production incident (a server-side circuit breaker tripping on expected business errors). Enable each one explicitly where you need it.
Properties ​
bulkhead? ​
optionalbulkhead?:boolean|BulkheadOptions
Defined in: defaults.ts:64
Bulkhead interceptor. Limits concurrent requests to prevent resource exhaustion. Opt-in: no hidden behavioral logic.
Default ​
falsecircuitBreaker? ​
optionalcircuitBreaker?:boolean|CircuitBreakerOptions
Defined in: defaults.ts:73
Circuit breaker interceptor. Prevents cascading failures by breaking circuit on consecutive errors. Opt-in: no hidden behavioral logic. Intended primarily for outbound client transports — see the README before enabling it server-side.
Default ​
falseerrorHandler? ​
optionalerrorHandler?:boolean|ErrorHandlerOptions
Defined in: defaults.ts:48
Error handler interceptor (first in chain). Transforms errors into ConnectError with proper codes.
Default ​
truefallback? ​
optionalfallback?:boolean|FallbackOptions<unknown>
Defined in: defaults.ts:90
Fallback interceptor. Provides graceful degradation when service fails. Disabled by default — requires a handler function. Pass an options object with a handler to enable it; true leaves it disabled.
Default ​
falseretry? ​
optionalretry?:boolean|RetryOptions
Defined in: defaults.ts:81
Retry interceptor. Retries transient failures with exponential backoff. Opt-in: no hidden behavioral logic.
Default ​
falseserializer? ​
optionalserializer?:boolean|SerializerOptions
Defined in: defaults.ts:105
Serializer interceptor (last in chain). Auto JSON serialization for ConnectRPC responses. Disabled by default — enable explicitly when JSON output is needed.
Default ​
falsetimeout? ​
optionaltimeout?:boolean|TimeoutOptions
Defined in: defaults.ts:56
Timeout interceptor. Enforces request deadline before any processing. Opt-in: no hidden behavioral logic.
Default ​
falsevalidation? ​
optionalvalidation?:boolean
Defined in: defaults.ts:97
Validation interceptor. Validates request messages using @connectrpc/validate.
Default ​
true