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

fix: return response with errorsource instead of nil #1069

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

njvrzm
Copy link
Contributor

@njvrzm njvrzm commented Sep 3, 2024

What this PR does / why we need it:
Currently errors from NewInstance are returned from Manager.QueryData with a nil QueryDataResponse, which obscures the errorsource. This changes that method to return a QueryDataResponse with the error with errorsource set, which improves both user experience and alerting.

Which issue(s) this PR fixes:
Fixes #1068

Fixes #

Special notes for your reviewer:

@njvrzm njvrzm added the bug Something isn't working label Sep 3, 2024
@njvrzm njvrzm self-assigned this Sep 3, 2024
@njvrzm njvrzm requested a review from a team as a code owner September 3, 2024 10:12
@njvrzm njvrzm requested review from wbrowne, andresmgot and oshirohugo and removed request for a team September 3, 2024 10:12
Copy link
Contributor

@marefr marefr left a comment

Choose a reason for hiding this comment

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

Somewhat related to the changes in #1066 and those changes executes after your changes. I think this should be fine, but it will start sending any errors in clear text to the end users which might include sensitive information. Might need some additional thoughts/discussions

Copy link
Contributor

@marefr marefr left a comment

Choose a reason for hiding this comment

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

LGTM talked with the team and they reminded me that returning sensitive information for errors might already be happening with CheckHealth. But you should take any sensitive information into account in general that comes from errors - This information might be used by a bad actor to gain information about the hosting environment etc

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, thanks!

@njvrzm njvrzm merged commit be0c152 into main Sep 6, 2024
3 checks passed
@njvrzm njvrzm deleted the njvrzm/return-errorstatus-from-manager-querydata branch September 6, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors from InstanceFactoryFunc are obscured by QueryData's handling
3 participants