rusackas opened a new pull request, #42736: URL: https://github.com/apache/superset/pull/42736
### SUMMARY Adds a regression test for #42580: `LoggingMiddleware._is_error_response` substring-matches for the literal `"error_type"` key in a tool's serialized response, but response schemas like `ExecuteSqlResponse` declare `error`/`error_type` as always-present nullable fields. A fully successful `execute_sql` response therefore still serializes `"error_type":null`, and the substring check misclassifies it as an error — every successful SQL execution gets logged with `success=False` in the `mcp_tool_call` audit event. This is a TDD/pin PR: test-only, no production code change. The new test is **red** on current master, confirming the bug reproduces exactly as described in the issue. ### TESTING INSTRUCTIONS ``` pytest tests/unit_tests/mcp_service/test_middleware_logging.py::TestIsErrorResponse -v ``` `test_success_response_with_null_error_type_not_detected_as_error` fails on current master. ### ADDITIONAL INFORMATION - [x] Has associated issue: #42580 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
