Commit c19a3f7
committed
[csharp][restsharp] honour throwOnAnyError when retry policy is configured
Polly's ExecuteAndCapture catches the rethrown ApiException, so without
this change the option is silently neutralized whenever
RetryConfiguration.RetryPolicy != null: the exception ends up in
RestResponse.ErrorException, which ToApiResponse discards.
When throwOnAnyError is enabled, rethrow PolicyResult.FinalException
from DeserializeRestResponseFromPolicyAsync so the contract is
consistent across both the no-retry and retry paths. Default-off branch
is byte-identical to the previous output.1 parent fe704b5 commit c19a3f7
2 files changed
Lines changed: 12 additions & 2 deletions
File tree
- modules/openapi-generator/src/main/resources/csharp
Lines changed: 6 additions & 1 deletion
| 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 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
570 | 574 | | |
571 | 575 | | |
572 | 576 | | |
573 | 577 | | |
| 578 | + | |
574 | 579 | | |
575 | 580 | | |
576 | 581 | | |
| |||
Lines changed: 6 additions & 1 deletion
| 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 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
561 | 565 | | |
562 | 566 | | |
563 | 567 | | |
564 | 568 | | |
| 569 | + | |
565 | 570 | | |
566 | 571 | | |
567 | 572 | | |
| |||
0 commit comments