-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix documentation for ExecuteOutcomeAsync (#2680) #2710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix documentation for ExecuteOutcomeAsync (#2680) #2710
Conversation
|
@dotnet-policy-service agree |
68b2fe0 to
2da95a5
Compare
|
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
|
Thanks for the contribution. |
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