Commit 65b15cc
committed
[csharp][restsharp] guard throwOnAnyError against null FinalException
Polly's PolicyResult.FinalException is null when Outcome is Failure but
the failure type is ResultHandledByThisPolicy (e.g. a retry policy
configured with .HandleResult(...) that gives up after N retries).
Throwing it directly would NRE; fall back to InvalidOperationException
so the option still surfaces an error.
Also restores the trailing whitespace on the if line so existing
restsharp samples don't all need regenerating.1 parent c19a3f7 commit 65b15cc
2 files changed
Lines changed: 4 additions & 4 deletions
File tree
- modules/openapi-generator/src/main/resources/csharp
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
564 | | - | |
| 564 | + | |
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | | - | |
| 571 | + | |
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
555 | | - | |
| 555 | + | |
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
562 | | - | |
| 562 | + | |
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| |||
0 commit comments