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

Clean up error handling #21

Merged
merged 3 commits into from
Mar 22, 2022
Merged

Clean up error handling #21

merged 3 commits into from
Mar 22, 2022

Conversation

ywwg
Copy link
Contributor

@ywwg ywwg commented Mar 18, 2022

All <500 errors should only be info-logged because they are expected and not a problem for the operation of the server. >=500s are warnings because they are trouble, but do not represent unrecoverable server errors.

Note that we are returning error contents into the http error. We should make sure that there's no chance that internal error details might get returned to clients. I don't think that is a possibility but we should spot-check as development continues to make sure

@ywwg ywwg requested a review from carrieedwards March 18, 2022 18:50
@@ -73,7 +73,7 @@ func influxPointToTimeseries(pt models.Point) ([]cortexpb.TimeSeries, error) {

fields, err := pt.Fields()
if err != nil {
return nil, fmt.Errorf("error getting fields from point: %w", err)
return nil, errorx.Internal{Msg: "error getting fields from point", Err: err}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not exactly sure what kind of error this is, but it seems like an internal, not a client error.

@ywwg ywwg merged commit bccdd1a into main Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants