Repository navigation
[To master] Avoid stack traces for expected REST query errors - #19281
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19281 +/- ##
============================================
+ Coverage 49.16% 49.21% +0.04%
- Complexity 689 699 +10
============================================
Files 5593 5593
Lines 414614 414717 +103
Branches 54755 54769 +14
============================================
+ Hits 203841 204085 +244
+ Misses 210773 210632 -141 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.




Cherry-pick #19280 (merged commit e986397) from dev/1.3 onto master, based on e78f736.
REST v1 and v2 currently log WARN stack traces for expected query failures. Share the query logging policy from ErrorHandlingUtils with both handlers. For example, a ParseCancellationException("invalid SQL") still returns SQL_PARSE_ERROR and the same message, but now produces INFO without a stack trace. STORAGE_ENGINE_NOT_READY remains silent, while unexpected failures retain WARN stack traces.
Adapt the handlers and parameterized tests to master's external-service-impl/rest module and current exception packages. Preserve master's complete expected-error classification (including LBAC, table/column, and metadata lease errors) and existing localized message template. The regression tests also cover master-specific status codes.
Validation with JDK 17:
mvn clean test -pl external-service-impl/rest -am -Dtest=ExceptionHandlerTest,ErrorHandlingUtilsTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false: passed, 12 tests, no failures/errors/skips.mvn test-compile -DskipTests: passed.mvn test-compile -DskipTests -P with-zh-locale: passed.git diff --check: passed.