-
Notifications
You must be signed in to change notification settings - Fork 499
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
docs: Add ADR dir and error handling ADR #2664
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2664 +/- ##
=====================================
Coverage 79.6% 79.6%
=====================================
Files 123 123
Lines 23034 23034
=====================================
Hits 18356 18356
Misses 4678 4678 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@cijothomas re-wrote a bunch to reflect discussion and current state! |
@cijothomas is this good to merge? It'd be great to have a concrete example in place so we can start to follow the pattern - for instance for the tracing interop Björn is working on |
As discussed @cijothomas i've made this super prescriptive guidance now, and linked out to the ADR-format discussion for more detail. |
docs/adr/001_error_handling.md
Outdated
### 2. Consolidate error types within a trait where we can, let them diverge when we can't** | ||
|
||
We aim to consolidate error types where possible _without indicating a function may return more errors than it can actually return_. | ||
Here's an example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with the content, but code example is not intuitive. May I suggest a pattern like
"don't do this"
show bad code
"instead, do this"
show correct one.
I think such a pattern makes it easier to follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Great start to following this practice throughout.
Left some small comments. Would love to get one more eyes to review!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nit comments. Thanks for adding this ADR, definitely bring clarity in our error handling design.
Co-authored-by: Zhongyang Wu <zhongyang.wu@outlook.com> Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
@cijothomas went through all the comments again, should be good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Fixes #2571
Capturing decision record for error handling in repo with new docs.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes