betodealmeida commented on pull request #13960:
URL: https://github.com/apache/superset/pull/13960#issuecomment-813822057


   > So in this case, you've got the `DatabaseTestConnectionFailedError` that 
`test_connection` can raise. Should this be something that extends a 
`SupersetErrorException` or should it be caught in the `handle_exception` 
wrapper and then return a response with a constructed SupersetError of type 
`TEST_CONNECTION_PORT_CLOSED_ERROR` or `TEST_CONNECTION_HOST_DOWN_ERROR`?
   
   Right, I actually have another PR where I started doing that:
   
   ```python
   class DatabaseTestConnectionFailedError(SupersetErrorsException):
       message = _("Connection failed, please check your connection settings")
   ```
   
   This way it will expose the proper errors (and additional errors that I'm 
adding, eg, `TEST_CONNECTION_INVALID_USERNAME_ERROR`).


-- 
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