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

Enrich errors with error source using grpc status package #1163

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

wbrowne
Copy link
Member

@wbrowne wbrowne commented Dec 5, 2024

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@wbrowne wbrowne added the enhancement New feature or request label Dec 5, 2024
@wbrowne wbrowne self-assigned this Dec 5, 2024
@wbrowne wbrowne marked this pull request as ready for review December 10, 2024 12:42
@wbrowne wbrowne requested a review from a team as a code owner December 10, 2024 12:42
@wbrowne wbrowne requested review from andresmgot, oshirohugo and xnyo and removed request for a team December 10, 2024 12:42
Copy link
Member

@xnyo xnyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have some tests? I am not sure how the new info is being returned

@wbrowne wbrowne requested a review from andresmgot December 11, 2024 16:54
Copy link
Member

@ivanahuckova ivanahuckova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

if IsDownstreamError(err) {
errorSource = status.SourceDownstream
} else if IsPluginError(err) {
errorSource = status.SourcePlugin
}

// Unless the error is explicitly marked as a plugin or downstream error, we don't enrich it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🔬 In review
Development

Successfully merging this pull request may close these issues.

4 participants