DamianPendrak commented on code in PR #34674:
URL: https://github.com/apache/superset/pull/34674#discussion_r2309940710
##########
superset/db_engine_specs/base.py:
##########
@@ -1331,7 +1331,18 @@ def extract_errors(
raw_message = cls._extract_error_message(ex)
context = context or {}
- for regex, (message, error_type, extra) in cls.custom_errors.items():
+
+ config_custom_errors = app.config.get("CUSTOM_DATABASE_ERRORS", {})
+ if not isinstance(config_custom_errors, dict):
+ config_custom_errors = {}
+ db_engine_custom_errors = config_custom_errors.get(cls.engine_name, {})
Review Comment:
Done. Works with both now
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]