bito-code-review[bot] commented on PR #39964:
URL: https://github.com/apache/superset/pull/39964#issuecomment-4405080991
<!-- Bito Reply -->
The flagged issue is correct: including GENERIC_DB_ENGINE_ERROR in
_CONNECTION_ERROR_TYPES causes _classify_as_database_error to misclassify
non-connection errors as database connectivity issues, since extract_errors
falls back to it for unmatched exceptions. Removing GENERIC_DB_ENGINE_ERROR
from the set improves accuracy by limiting connection error classification to
specific types. Here's the updated code snippet for _CONNECTION_ERROR_TYPES:
**superset/mcp_service/chart/compile.py**
```
_CONNECTION_ERROR_TYPES = {
SupersetErrorType.CONNECTION_INVALID_USERNAME_ERROR,
SupersetErrorType.CONNECTION_INVALID_PASSWORD_ERROR,
SupersetErrorType.CONNECTION_INVALID_HOSTNAME_ERROR,
SupersetErrorType.CONNECTION_PORT_CLOSED_ERROR,
SupersetErrorType.CONNECTION_INVALID_PORT_ERROR,
SupersetErrorType.CONNECTION_HOST_DOWN_ERROR,
SupersetErrorType.CONNECTION_ACCESS_DENIED_ERROR,
SupersetErrorType.CONNECTION_UNKNOWN_DATABASE_ERROR,
SupersetErrorType.CONNECTION_DATABASE_PERMISSIONS_ERROR,
SupersetErrorType.CONNECTION_MISSING_PARAMETERS_ERROR,
SupersetErrorType.CONNECTION_DATABASE_TIMEOUT,
}
```
--
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]