john-bodley commented on a change in pull request #9753:
URL: https://github.com/apache/incubator-superset/pull/9753#discussion_r420953042
##########
File path: superset/viz.py
##########
@@ -460,8 +462,19 @@ def get_df_payload(self, query_obj=None, **kwargs):
is_loaded = True
except Exception as ex:
logger.exception(ex)
- if not self.error_message:
- self.error_message = "{}".format(ex)
+
+ error = dataclasses.asdict(
+ SupersetError(
+ message="{}".format(ex),
+ level=ErrorLevel.ERROR,
+ type=SupersetErrorType.VIZ_GET_DF_ERROR,
+ extra={},
+ )
+ )
+ if not self.errors:
Review comment:
See previous comment which would simplify this to `self.errors.append(error)`.
----------------------------------------------------------------
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
|