Connectum API Reference / @connectum/interceptors / defaults / DefaultInterceptorOptions
Interface: DefaultInterceptorOptions
Defined in: defaults.ts:39
Configuration options for the default interceptor chain.
Each interceptor can be:
falseto disable it entirelytrueto enable with default options- An options object to enable with custom configuration
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:61
Bulkhead interceptor. Limits concurrent requests to prevent resource exhaustion. Opt-in: no hidden behavioral logic.
Default
falsecircuitBreaker?
optionalcircuitBreaker?:boolean|CircuitBreakerOptions
Defined in: defaults.ts:70
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:45
Error handler interceptor (first in chain). Transforms errors into ConnectError with proper codes.
Default
truefallback?
optionalfallback?:boolean|FallbackOptions<unknown>
Defined in: defaults.ts:86
Fallback interceptor. Provides graceful degradation when service fails. Disabled by default — requires a handler function.
Default
falseretry?
optionalretry?:boolean|RetryOptions
Defined in: defaults.ts:78
Retry interceptor. Retries transient failures with exponential backoff. Opt-in: no hidden behavioral logic.
Default
falseserializer?
optionalserializer?:boolean|SerializerOptions
Defined in: defaults.ts:101
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:53
Timeout interceptor. Enforces request deadline before any processing. Opt-in: no hidden behavioral logic.
Default
falsevalidation?
optionalvalidation?:boolean
Defined in: defaults.ts:93
Validation interceptor. Validates request messages using @connectrpc/validate.
Default
true