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



##########
File path: docs/src/pages/docs/Miscellaneous/issue_codes.mdx
##########
@@ -141,11 +141,11 @@ The username provided when connecting to a database is 
not valid.
 The user provided a username that doesn't exist in the database. Please check
 that the username is typed correctly and exists in the database.
 
-## Issue 1013
+## Issue 1014
 
 ```
-The password provided when connecting to a database is not valid.
+Either the username or the password used are incorrect.
 ```
 
-The user provided a password that is incorrect. Please check that the
-password is typed correctly.
+Either the username provided does not exist or the password was written 
incorrectly. Please
+check that the username and password were typed correctly.

Review comment:
       This is still overwriting an existing issue.

##########
File path: superset/db_engine_specs/mysql.py
##########
@@ -93,6 +106,21 @@ class MySQLEngineSpec(BaseEngineSpec):
 
     type_code_map: Dict[int, str] = {}  # loaded from get_datatype only if 
needed
 
+    custom_errors = {
+        TEST_CONNECTION_ACCESS_DENIED_REGEX: (
+            __('Either the username "%(username)s" or the password is 
incorrect.'),
+            SupersetErrorType.TEST_CONNECTION_ACCESS_DENIED_ERROR,
+        ),
+        TEST_CONNECTION_INVALID_HOSTNAME_REGEX: (
+            __('Unknown MySQL server host "%(hostname)s".'),
+            SupersetErrorType.TEST_CONNECTION_INVALID_HOSTNAME_ERROR,
+        ),
+        TEST_CONNECTION_HOST_DOWN_REGEX: (
+            __("The host %(hostname)s might be down and can't be reached."),

Review comment:
       Let's be consistent and always quote the hostname (I need to do the same 
on my PR for MSSQL).

##########
File path: superset/errors.py
##########
@@ -164,14 +165,13 @@ class SupersetErrorType(str, Enum):
             ),
         },
     ],
-    SupersetErrorType.TEST_CONNECTION_INVALID_PASSWORD_ERROR: [
+    SupersetErrorType.TEST_CONNECTION_ACCESS_DENIED_ERROR: [

Review comment:
       This still needs to be fixed.




-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to