fa219d839e169aa0194f4ff7865a31bebcbc0b0a
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.
Description
My contributions to App-vNext/Polly: 1 commits, 1 merged PRs
30 KiB
0 Stars
1 Watchers
0 Forks
Languages
C#
100%