Skip to content

Connectum API Reference / @connectum/interceptors / defaults / DefaultInterceptorOptions

Interface: DefaultInterceptorOptions

Defined in: defaults.ts:33

Configuration options for the default interceptor chain.

Each interceptor can be:

  • false to disable it entirely
  • true to enable with default options
  • An options object to enable with custom configuration

All interceptors are enabled by default except fallback (which requires a handler function).

Properties

bulkhead?

optional bulkhead: boolean | BulkheadOptions

Defined in: defaults.ts:53

Bulkhead interceptor. Limits concurrent requests to prevent resource exhaustion.

Default

ts
true (10/10)

circuitBreaker?

optional circuitBreaker: boolean | CircuitBreakerOptions

Defined in: defaults.ts:60

Circuit breaker interceptor. Prevents cascading failures by breaking circuit on consecutive errors.

Default

ts
true (5 failures)

errorHandler?

optional errorHandler: boolean | ErrorHandlerOptions

Defined in: defaults.ts:39

Error handler interceptor (first in chain). Transforms errors into ConnectError with proper codes.

Default

ts
true

fallback?

optional fallback: boolean | FallbackOptions<unknown>

Defined in: defaults.ts:75

Fallback interceptor. Provides graceful degradation when service fails. Disabled by default — requires a handler function.

Default

ts
false

retry?

optional retry: boolean | RetryOptions

Defined in: defaults.ts:67

Retry interceptor. Retries transient failures with exponential backoff.

Default

ts
true (3 retries)

serializer?

optional serializer: boolean | SerializerOptions

Defined in: defaults.ts:89

Serializer interceptor (last in chain). Auto JSON serialization for ConnectRPC responses.

Default

ts
true

timeout?

optional timeout: boolean | TimeoutOptions

Defined in: defaults.ts:46

Timeout interceptor. Enforces request deadline before any processing.

Default

ts
true (30s)

validation?

optional validation: boolean

Defined in: defaults.ts:82

Validation interceptor. Validates request messages using @connectrpc/validate.

Default

ts
true