chore: simplify error messaging in database modal (#19165)

* testing for dbconn modal error message

* remove consoles and error alert mapping

* lint fix

* update url message

* add modal fix

* update comments

* fix err msg bugs

* fix pylint

* fix line

* fix tests

* fix assertions
This commit is contained in:
Phillip Kelley-Dotson
2022-04-21 12:44:21 -07:00
committed by GitHub
parent fa680369ea
commit ad715429f9
5 changed files with 31 additions and 82 deletions

View File

@@ -76,7 +76,11 @@ def test_validate_parameters_catalog(
assert errors == [
SupersetError(
message="URL could not be identified",
message=(
"The URL could not be identified. Please check for typos "
"and make sure that Type of Google Sheets allowed "
"selection matches the input."
),
error_type=SupersetErrorType.TABLE_DOES_NOT_EXIST_ERROR,
level=ErrorLevel.WARNING,
extra={
@@ -97,7 +101,11 @@ def test_validate_parameters_catalog(
},
),
SupersetError(
message="URL could not be identified",
message=(
"The URL could not be identified. Please check for typos "
"and make sure that Type of Google Sheets allowed "
"selection matches the input."
),
error_type=SupersetErrorType.TABLE_DOES_NOT_EXIST_ERROR,
level=ErrorLevel.WARNING,
extra={
@@ -158,7 +166,11 @@ def test_validate_parameters_catalog_and_credentials(
errors = GSheetsEngineSpec.validate_parameters(parameters) # ignore: type
assert errors == [
SupersetError(
message="URL could not be identified",
message=(
"The URL could not be identified. Please check for typos "
"and make sure that Type of Google Sheets allowed "
"selection matches the input."
),
error_type=SupersetErrorType.TABLE_DOES_NOT_EXIST_ERROR,
level=ErrorLevel.WARNING,
extra={