Repository navigation
fix: apply errorResponseTransform to query execution failures - #20529
Open
capistrant wants to merge 1 commit into
Open
capistrant wants to merge 1 commit into
capistrant wants to merge 1 commit into
Conversation
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
#11711 added functionality for creating runtime transformations to error messages according to a policy. The initial policy was a regex that can be used to sanitize what errors pass through to callers. #18487 added a new policy,
persona. Thepersonapolicy hides non-user persona error details from clients, and instead gives them a generic error with an ID that an operator can take to troubleshoot more deeply. In investigating how I may leverage this policy for a use case, I found that the transformations were not always taking effect and some other apparent issues existed.This PR aims to close some of the gaps in the implementation to give more complete coverage to the documented feature.
QueryExceptionCompat. This allows these exceptions to be transformed as well now.OPERATORtoUSERpersonaissue for JDBC and Druid router errors fixed.transformIfNeededwas callinggetErrorMessageTransformFunctionwhich threwUnsupportedOperationException. persona now implementstransformIfNeededso the policy can transform JDBC and router generated errorsRelease note
Fixed gaps in
druid.server.http.errorResponseTransformKey changed/added classes in this PR
This PR has: