superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-superset] etr2460 commented on a change in pull request #9753: feat: convert backend chart errors to the new error type
Date Fri, 08 May 2020 17:24:04 GMT

etr2460 commented on a change in pull request #9753:
URL: https://github.com/apache/incubator-superset/pull/9753#discussion_r422268409



##########
File path: superset/models/helpers.py
##########
@@ -374,13 +374,20 @@ class QueryResult:  # pylint: disable=too-few-public-methods
     """Object returned by the query interface"""
 
     def __init__(  # pylint: disable=too-many-arguments
-        self, df, query, duration, status=QueryStatus.SUCCESS, error_message=None
+        self,
+        df,
+        query,
+        duration,
+        status=QueryStatus.SUCCESS,
+        error_message=None,
+        errors=None,
     ):
         self.df: pd.DataFrame = df
         self.query: str = query
         self.duration: int = duration
         self.status: str = status
         self.error_message: Optional[str] = error_message
+        self.errors: Optional[List[Dict[str, Any]]] = errors

Review comment:
       I actually think it's better to keep this optional? Because at the end of the day we
send `errors` down to the client, and i think it being null is better than `[]`




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Mime
View raw message