Skip to content

[To dev/1.3] Avoid stack traces for expected REST query errors - #19280

Merged
JackieTien97 merged 1 commit into
dev/1.3from
ty/fix-rest-query-exception-logging
Nov 14, 2026
Merged

JackieTien97 merged 1 commit into
dev/1.3from
ty/fix-rest-query-exception-logging

Conversation

@JackieTien97

Copy link
Copy Markdown
Contributor

REST v1 and v2 unconditionally logged exception stack traces, including invalid SQL and other expected query failures. Extract the logging policy from ErrorHandlingUtils.onQueryException and share it with both REST exception handlers: expected errors log at INFO without a stack trace, storage-engine-not-ready errors remain silent, and other errors retain WARN stack traces. Existing REST response codes and messages are unchanged.

Add parameterized regression coverage for both REST versions, checking response compatibility, log levels, and the presence or absence of stack traces.

Validation: mvn clean test -pl iotdb-core/datanode -am -Dtest=ExceptionHandlerTest,ErrorHandlingUtilsTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false with JDK 17. Build passed; all 12 tests passed. Spotless and git diff --check passed.

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.49%. Comparing base (7526403) to head (6cd7878).

Additional details and impacted files
@@            Coverage Diff             @@
##             dev/1.3   #19280   +/-   ##
==========================================
  Coverage      47.49%   47.49%           
  Complexity       221      221           
==========================================
  Files           3678     3678           
  Lines         252123   252126    +3     
  Branches       31360    31359    -1     
==========================================
+ Hits          119740   119751   +11     
+ Misses        132383   132375    -8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JackieTien97
JackieTien97 merged commit e986397 into dev/1.3 Nov 14, 2026
19 checks passed
@JackieTien97
JackieTien97 deleted the ty/fix-rest-query-exception-logging branch November 14, 2026 13:19
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.

1 participant