superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [superset] betodealmeida commented on a change in pull request #14089: feat: invalid hostname and password error messages (MySQL)
Date Mon, 12 Apr 2021 23:56:35 GMT

betodealmeida commented on a change in pull request #14089:
URL: https://github.com/apache/superset/pull/14089#discussion_r612026760



##########
File path: superset/db_engine_specs/mysql.py
##########
@@ -93,6 +104,21 @@ class MySQLEngineSpec(BaseEngineSpec):
 
     type_code_map: Dict[int, str] = {}  # loaded from get_datatype only if needed
 
+    custom_errors = {
+        INVALID_ACCESS_REGEX: (
+            __('Either the username "%(username)s" or the password is incorrect.'),
+            SupersetErrorType.TEST_CONNECTION_ACCESS_DENIED_ERROR,
+        ),
+        INVALID_HOSTNAME_REGEX: (
+            __('Unknown MySQL server host "%(hostname)s"'),
+            SupersetErrorType.TEST_CONNECTION_INVALID_HOSTNAME_ERROR,
+        ),
+        CONNECTION_HOST_DOWN_REGEX: (

Review comment:
       Ah, I just saw that this already existed, sorry.
   
   But I think we should call this `TEST_CONNECTION_HOST_DOWN_REGEX`, to match the error type.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Mime
View raw message