willbarrett commented on a change in pull request #13223:
URL: https://github.com/apache/superset/pull/13223#discussion_r579411902



##########
File path: superset/databases/api.py
##########
@@ -238,6 +238,7 @@ def post(self) -> Response:
         except DatabaseInvalidError as ex:
             return self.response_422(message=ex.normalized_messages())
         except DatabaseConnectionFailedError as ex:
+            logger.exception("Database connection failed")

Review comment:
       What DB engines are failing the most?
   I think you could parse the submitted SQLAlchemy URL to pull out the 
`scheme` portion of the URL and log that on failure. This would avoid the risk 
of capturing secure credentials.
   
   What are the the test connection and DB connection exceptions for these 
engines?
   Would it be sufficient to log the exception class from the engine without 
the message? The class will give you the category of error without including 
any of the potentially sensitive details. If this would work, you could more 
easily perform this logging from the command rather than in the endpoint.




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to