JackieTien97 opened a new pull request, #19280: URL: https://github.com/apache/iotdb/pull/19280
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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
