fix documentation for ExecuteOutcomeAsync (#2680)#2710
Merged
martincostello merged 1 commit intoAug 22, 2025
Conversation
Contributor
Author
|
@dotnet-policy-service agree |
68b2fe0 to
2da95a5
Compare
Member
|
The snippets don't compile - please check that they build before committing changes to them. |
2da95a5 to
9372c7b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2710 +/- ##
=======================================
Coverage 96.12% 96.12%
=======================================
Files 309 309
Lines 7118 7118
Branches 1008 1008
=======================================
Hits 6842 6842
Misses 222 222
Partials 54 54
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
9372c7b to
950a4fd
Compare
martincostello
approved these changes
Aug 22, 2025
Member
|
Thanks for the contribution. |
This was referenced Sep 26, 2025
This was referenced Jun 2, 2026
This was referenced Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
The issue or feature being addressed
Fix the Documentation that has incorrect examples for ExecuteOutcomeAsync #2680
Details on the issue fix or feature implementation
Migration Guide (migration-v8.md)
Replaced example that passed a throwing callback with the safe pattern: wrapping the MethodAsync call in try/catch and returning either Outcome.FromResult(...) or Outcome.FromException(...).
Fallback Strategy (fallback.md)
Updated the “✅ DO” snippet to wrap user code in try/catch and properly return Outcome, enabling exception remapping logic without throwing from the callback.
Circuit Breaker Strategy (circuit-breaker.md)
Rewrote the “✅ DO” example to include exception capture via Outcome, and updated post-execution logic to correctly handle both BrokenCircuitException and other errors.
Updated the V8 example (SafeExecute_V8) to use the correct, safe callback pattern: wrapping in try/catch and returning an Outcome. This ensures consistency across sample code and real documentation.
Confirm the following