Skip to content
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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mark-pictor-csec
Copy link

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.

Copy link

linux-foundation-easycla bot commented Oct 29, 2024

CLA Not Signed

@dmathieu dmathieu added the blocked:CLA Waiting on CLA to be signed before progress can be made label Oct 30, 2024
@dmathieu
Copy link
Member

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.

Could you split that into another PR?

You will need to sign the CLA.

@mark-pictor-csec
Copy link
Author

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.

Could you split that into another PR?

Can do.

You will need to sign the CLA.

Yes, I am waiting on someone within my company (corp CLA).

@mark-pictor-csec mark-pictor-csec marked this pull request as draft October 31, 2024 19:35
@mark-pictor-csec
Copy link
Author

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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked:CLA Waiting on CLA to be signed before progress can be made
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants