fix: Dynamic form to connect to Snowflake DB is not displaying authentication errors (#19491)

* fix: Dynamic form to connect to Snowflake DB is not displaying authentication errors

* pr comments
This commit is contained in:
Diego Medina
2022-04-05 15:11:33 -04:00
committed by GitHub
parent 1521ab3b6f
commit 634693b270
2 changed files with 16 additions and 0 deletions

View File

@@ -89,6 +89,9 @@ const engineSpecificAlertMapping = {
};
const errorAlertMapping = {
GENERIC_DB_ENGINE_ERROR: {
message: t('Generic database engine error'),
},
CONNECTION_MISSING_PARAMETERS_ERROR: {
message: t('Missing Required Fields'),
description: t('Please complete all required fields.'),
@@ -929,6 +932,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
}
description={
errorAlertMapping[validationErrors?.error_type]?.description ||
validationErrors?.description ||
JSON.stringify(validationErrors)
}
showIcon