mistercrunch commented on code in PR #20395:
URL: https://github.com/apache/superset/pull/20395#discussion_r907693881
##########
superset/db_engine_specs/bigquery.py:
##########
@@ -213,6 +218,52 @@ def fetch_data(
data = [r.values() for r in data] # type: ignore
return data
+ @classmethod
+ def _reformat_error_message(cls, message: str) -> ErrorMessageType:
+ """Reformat error message for user experience"""
+ splitted_message = re.split("\n+", message, 1)
+ if len(splitted_message) > 1:
+ return ErrorMessageType(
+ short_message=splitted_message[0],
description=splitted_message[1]
+ )
+
+ return ErrorMessageType(short_message=splitted_message[0],
description="")
+
+ @classmethod
+ def extract_errors(
Review Comment:
Feels like this should be added to `superset/db_engine_specs/base.py`, and
called somewhere (?) It's hard to review this as is without the larger context
of how it's handled for other engines, and where it's called
--
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]