You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "villebro (via GitHub)" <gi...@apache.org> on 2023/04/19 13:30:36 UTC

[GitHub] [superset] villebro commented on a diff in pull request #23737: fix: get or create db with an existing invalid URL

villebro commented on code in PR #23737:
URL: https://github.com/apache/superset/pull/23737#discussion_r1171347213


##########
superset/models/core.py:
##########
@@ -888,7 +889,7 @@ def get_schema_access_for_file_upload(  # pylint: disable=invalid-name
     def sqlalchemy_uri_decrypted(self) -> str:
         try:
             conn = make_url_safe(self.sqlalchemy_uri)
-        except (ArgumentError, ValueError):
+        except DatabaseInvalidError:

Review Comment:
   I almost asked about why the old exceptions here aren't valid any more. To answer that question for other potential reviewers: we're already reraising all exceptions to `DatabaseInvalidError` here: https://github.com/apache/superset/blob/44557f5a23d5a6b8f7d6cc267f0d43337c36cd76/superset/databases/utils.py#L120-L121



-- 
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: notifications-unsubscribe@superset.apache.org

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