You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/02 11:06:08 UTC

[GitHub] [superset] dpgaspar commented on a change in pull request #12869: refactor: dbapi exception mapping for dbapi's

dpgaspar commented on a change in pull request #12869:
URL: https://github.com/apache/superset/pull/12869#discussion_r568514796



##########
File path: superset/db_engine_specs/base.py
##########
@@ -177,6 +178,35 @@ class BaseEngineSpec:  # pylint: disable=too-many-public-methods
         ),
     }
 
+    @classmethod
+    def get_dbapi_exception_mapping(cls) -> Dict[Type[Exception], Type[Exception]]:
+        """
+        Each engine can implement and converge it's own specific exceptions into

Review comment:
       Fixed, yes that's a good point, a simple way of doing it is:
   
   ```
   if not new_exception:
       return SupersetDBAPIError(str(exception))
   ```
   
   But can have broader implications, I want to place the base for this, and just interfere on the defined exceptions for Elasticsearch and clickhouse (for 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org