eschutho commented on code in PR #22024: URL: https://github.com/apache/superset/pull/22024#discussion_r1017258956
########## superset/db_engine_specs/bigquery.py: ########## @@ -578,3 +578,17 @@ def _get_fields(cls, cols: List[Dict[str, Any]]) -> List[Any]: "author__name" and "author__email", respectively. """ return [column(c["name"]).label(c["name"].replace(".", "__")) for c in cols] + + @classmethod + def parse_error_exception(cls, exception: Exception) -> Exception: + try: + return Exception( + str(exception) # pylint: disable=use-maxsplit-arg + .rsplit("\n")[0] + .rsplit(":")[1] + .strip() + ) + except Exception: # pylint: disable=broad-except Review Comment: I tried to get this to raise an exception and wasn't able to. I believe as long as the return value is a string, you should be able to perform all of the operations and don't need to put it in a try catch. -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org