mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +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:
@@ -389,6 +389,31 @@ psql: error: could not connect to server: Operation timed out
|
||||
)
|
||||
]
|
||||
|
||||
msg = "no password supplied"
|
||||
result = PostgresEngineSpec.extract_errors(Exception(msg))
|
||||
assert result == [
|
||||
SupersetError(
|
||||
error_type=SupersetErrorType.CONNECTION_ACCESS_DENIED_ERROR,
|
||||
message="Please re-enter the password.",
|
||||
level=ErrorLevel.ERROR,
|
||||
extra={
|
||||
"engine_name": "PostgreSQL",
|
||||
"issue_codes": [
|
||||
{
|
||||
"code": 1014,
|
||||
"message": "Issue 1014 - Either the"
|
||||
" username or the password is wrong.",
|
||||
},
|
||||
{
|
||||
"code": 1015,
|
||||
"message": "Issue 1015 - Either the database is "
|
||||
"spelled incorrectly or does not exist.",
|
||||
},
|
||||
],
|
||||
},
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
def test_base_parameters_mixin():
|
||||
parameters = {
|
||||
|
||||
Reference in New Issue
Block a user