fix(database): test connection error message for module not found (#9634)

This commit is contained in:
Daniel Vaz Gaspar
2020-04-27 09:24:41 +01:00
committed by GitHub
parent 516bdf6db1
commit f07ca7d836
2 changed files with 20 additions and 1 deletions

View File

@@ -1376,7 +1376,7 @@ class Superset(BaseSupersetView):
except CertificateException as ex:
logger.info(ex.message)
return json_error_response(ex.message)
except NoSuchModuleError as ex:
except (NoSuchModuleError, ModuleNotFoundError) as ex:
logger.info("Invalid driver %s", ex)
driver_name = make_url(uri).drivername
return json_error_response(