dpgaspar commented on pull request #11973: URL: https://github.com/apache/incubator-superset/pull/11973#issuecomment-741976499
> I thought SQLAlchemy should have the mechanism to catch all DB-API exceptions. [Here](https://github.com/sqlalchemy/sqlalchemy/blob/master/lib/sqlalchemy/exc.py#L635) is the SQLAlchemy wrapping of the `NotSupportedError` which is a child of `sqlalchemy.exc.DatabaseError` which is a child of `sqlalchemy.exc.DBAPIError` which eventually rolls up to a `sqlalchemy.exc.SQLAlchemyError` exception. > > Either `DBAPIError` or `SQLAlchemyError` seems like a better candidate that `Exception` for broad SQLAlchemy issues. True, I was following the logic directly on pydruid: https://github.com/druid-io/pydruid/blob/master/pydruid/db/exceptions.py#L37 That ends up on `Exception`, SQLAlchemy wraps db-api exceptions, but this one was slipping and ended up being a 500 on the API. Will test it further ---------------------------------------------------------------- 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]
