mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
fix: fixing mysql error message (#14416)
* fixing mysql error message * Update tests/db_engine_specs/mysql_tests.py Co-authored-by: Beto Dealmeida <roberto@dealmeida.net> * Update tests/db_engine_specs/mysql_tests.py Co-authored-by: Beto Dealmeida <roberto@dealmeida.net> * Update tests/db_engine_specs/mysql_tests.py Co-authored-by: Beto Dealmeida <roberto@dealmeida.net> * Update superset/db_engine_specs/mysql.py Co-authored-by: Beto Dealmeida <roberto@dealmeida.net> * fixed broken test * changed error type Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
This commit is contained in:
@@ -62,6 +62,7 @@ CONNECTION_INVALID_USERNAME_REGEX = re.compile(
|
||||
CONNECTION_INVALID_PASSWORD_REGEX = re.compile(
|
||||
'password authentication failed for user "(?P<username>.*?)"'
|
||||
)
|
||||
CONNECTION_INVALID_PASSWORD_NEEDED_REGEX = re.compile("no password supplied")
|
||||
CONNECTION_INVALID_HOSTNAME_REGEX = re.compile(
|
||||
'could not translate host name "(?P<hostname>.*?)" to address: '
|
||||
"nodename nor servname provided, or not known"
|
||||
@@ -108,6 +109,10 @@ class PostgresBaseEngineSpec(BaseEngineSpec):
|
||||
__('The password provided for username "%(username)s" is incorrect.'),
|
||||
SupersetErrorType.CONNECTION_INVALID_PASSWORD_ERROR,
|
||||
),
|
||||
CONNECTION_INVALID_PASSWORD_NEEDED_REGEX: (
|
||||
__("Please re-enter the password."),
|
||||
SupersetErrorType.CONNECTION_ACCESS_DENIED_ERROR,
|
||||
),
|
||||
CONNECTION_INVALID_HOSTNAME_REGEX: (
|
||||
__('The hostname "%(hostname)s" cannot be resolved.'),
|
||||
SupersetErrorType.CONNECTION_INVALID_HOSTNAME_ERROR,
|
||||
|
||||
Reference in New Issue
Block a user