mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
feat: invalid DB name error messages (MySQL/Postgres/Redshift) (#14146)
* initial DB custom errors for mysql * added redshift and postgres
This commit is contained in:
@@ -76,6 +76,9 @@ TEST_CONNECTION_HOST_DOWN_REGEX = re.compile(
|
||||
r'host "(?P<hostname>.*?)" (\(.*?\) )?and accepting\s+TCP/IP '
|
||||
r"connections on port (?P<port>.*?)\?"
|
||||
)
|
||||
TEST_CONNECTION_UNKNOWN_DATABASE_REGEX = re.compile(
|
||||
'database "(?P<database>.*?)" does not exist'
|
||||
)
|
||||
|
||||
|
||||
class PostgresBaseEngineSpec(BaseEngineSpec):
|
||||
@@ -120,6 +123,13 @@ class PostgresBaseEngineSpec(BaseEngineSpec):
|
||||
),
|
||||
SupersetErrorType.TEST_CONNECTION_HOST_DOWN_ERROR,
|
||||
),
|
||||
TEST_CONNECTION_UNKNOWN_DATABASE_REGEX: (
|
||||
__(
|
||||
'We were unable to connect to your database named "%(database)s".'
|
||||
" Please verify your database name and try again."
|
||||
),
|
||||
SupersetErrorType.TEST_CONNECTION_UNKNOWN_DATABASE_ERROR,
|
||||
),
|
||||
}
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user