fix: return 500 on internal failures#1053
Open
jranson wants to merge 1 commit into
Open
Conversation
Signed-off-by: James Ranson <james@ranson.org>
houyuwushang
reviewed
Jul 8, 2026
Contributor
There was a problem hiding this comment.
One small question: should dpcProxyErrorStatusCode also normalize 3xx statuses? fetchExtents treats any resp.StatusCode != http.StatusOK as a failed extent, so an all-3xx DPC failure would still be recorded as proxy-error but respond with that 3xx instead of a 5xx. If preserving upstream redirects/statuses is intentional here, this is fine; I just wanted to check because #1018 frames proxy-error responses as needing a 5xx.
Member
Author
|
Currently none of the supported backends that use DPC (prometheus, influxdb, clickhouse) return 3xx responses to a Trickster request (no redirects, and Trickster does not send |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This fixes the remaining cases outlined in #1018 - when a 200 response is received from a backend but trickster internally fails to handle the request (e.g., unmarshal failure). Other cases where a 200 was being returned instead of 5xx are already addressed. With this change, instead of proxying the 200 response to the caller on internal failures, the response code is now changed to 500 Internal Server Error before responding. When the internal failure is on one or more shards of a TSM operation, the TSM handles the failure(s) the same as if the failure came from the remote origin. Related tests are updated with the new expectation.
Type of Change
AI Disclosure