intercept

abstract suspend fun intercept(phase: StepPhase<C, R, S>): InterceptorOutcome

Intercept a saga step phase.

This is a suspend function, allowing interceptors to perform async operations such as network calls, database writes, or other non-blocking I/O.

For Before phases: returning Veto prevents the step from executing. For After and Compensation phases: the return value is ignored (throws are swallowed).

Return

InterceptorOutcome.Continue to allow execution, or InterceptorOutcome.Veto to abort

Parameters

phase

The current phase of the step being intercepted