diff --git a/superset-frontend/src/views/CRUD/hooks.ts b/superset-frontend/src/views/CRUD/hooks.ts index bd8e19cde1bd8..207dce68b62d1 100644 --- a/superset-frontend/src/views/CRUD/hooks.ts +++ b/superset-frontend/src/views/CRUD/hooks.ts @@ -651,11 +651,13 @@ export function useDatabaseValidation() { if (typeof e.json === 'function') { e.json().then(({ errors = [] }: JsonObject) => { const parsedErrors = errors - .filter( - (error: { error_type: string }) => - error.error_type !== - 'CONNECTION_MISSING_PARAMETERS_ERROR' || onCreate, - ) + .filter((error: { error_type: string }) => { + const skipValidationError = ![ + 'CONNECTION_MISSING_PARAMETERS_ERROR', + 'CONNECTION_ACCESS_DENIED_ERROR', + ].includes(error.error_type); + return skipValidationError || onCreate; + }) .reduce( ( obj: {},