-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Propagate non-retryable error messages to client #5929
base: main
Are you sure you want to change the base?
Propagate non-retryable error messages to client #5929
Conversation
Could you split that into another PR? You will need to sign the CLA. |
Can do.
Yes, I am waiting on someone within my company (corp CLA). |
|
5c6dc2a
to
4c276b1
Compare
There were inconsistencies in closing the response body. For traces, the Close happened in a defer statement and any error was logged. Logs and metrics were less rigorous. It appeared Close() wasn't always called, and when it was, errors were returned sometimes and ignored at other times. This applies the defer logic from traces to the other two and removes other Close() calls. This was part of PR #5929, and has been split out as requested: #5929 (comment)).
PR open-telemetry#5541 (and issue open-telemetry#5536) enhance error handling, returning body text as part of the error. However, this is only done for retryable errors; if non-retryable, error text still does not propagate to clients. This PR adds handling of non-retryable errors, ensuring any body text is part of the message returned to the user's code. There is no change to the circumstances under which errors are reported, just an enhancement of the content of such an error.
4c276b1
to
e3332de
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5929 +/- ##
=====================================
Coverage 84.6% 84.7%
=====================================
Files 272 272
Lines 22897 22906 +9
=====================================
+ Hits 19391 19403 +12
+ Misses 3162 3159 -3
Partials 344 344 |
@dmathieu CLA signed and the PR split from this is merged. Shall I create a new PR or are we good to go with this one? |
We are good with this one. |
PR #5541 (and issue #5536) enhance error handling, returning body text as part of the error. However, this is only done for retryable errors; if non-retryable, error text still does not propagate to clients.
This PR adds handling of non-retryable errors, ensuring any body text is part of the message returned to the user's code. There is no change to the circumstances under which errors are reported, just an enhancement of the content of such an error.