Method OnFailure
OnFailure(StepFailurePolicy)
Declares what the step just appended does when its retries are exhausted (§6.4).
ISagaBuilder<TData> OnFailure(StepFailurePolicy policy)
Parameters
policyStepFailurePolicy
Returns
- ISagaBuilder<TData>
Remarks
Annotates the preceding step, exactly like CompensateWith<TActivity>(). Without it a step unwinds the saga, which is the right default and the wrong one for a step whose earlier work should stand or whose failure needs a human first.
Exceptions
- InvalidOperationException
No step has been appended yet.