dualfroz fa219d839e fix(simmy): return null from FaultGenerator when no fault is generated
FaultGenerator's implicit conversion dereferenced the nullable Outcome
returned by the underlying generator via `!.Value`, throwing
InvalidOperationException ("Nullable object must have a value.") when the
generator produced no outcome - an empty generator, or registered weights
summing to zero. ChaosFaultStrategy treats a null fault as "do not inject"
and only catches OperationCanceledException, so the exception escaped and
failed the execution the strategy was meant to leave untouched.

Propagate the nullable outcome with `?.Exception`, mirroring
OutcomeGenerator<TResult>, so no fault is injected when none is generated.
2026-09-02 11:43:55 +02:00
S
Description
My contributions to App-vNext/Polly: 1 commits, 1 merged PRs
30 KiB
0 Stars 1 Watchers 0 Forks
Languages
C# 100%