-
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). |
Converted to draft until I get the CLA issue resolved. |
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.
20455e6
to
5c6dc2a
Compare
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.
5c6dc2a
to
4c276b1
Compare
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.
Aside from these errors, I noticed inconsistencies in the closing of 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.I applied the defer logic from traces to the other two, removing the other
Close()
calls.