mistercrunch commented on code in PR #20395:
URL: https://github.com/apache/superset/pull/20395#discussion_r900313069
##########
superset/db_engine_specs/base.py:
##########
@@ -901,6 +901,15 @@ def _extract_error_message(cls, ex: Exception) -> str:
"""Extract error message for queries"""
return utils.error_msg_from_exception(ex)
+ @classmethod
+ def _reformat_error_message(cls, message: str) -> Tuple[str, str]:
Review Comment:
I'm not big on a function that returns a tuple, short we have an object like
`DatabaseMessage`, maybe it's just a named tuple or similar. That object may
have more than two props. Maybe is has (engine, error_code, message_title,
short_message, details) (?)
Ideally this object can make its way to the frontend and have a typescript
counterpart there.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]