You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/07/06 08:37:37 UTC

[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #9964: feat(api): bump marshmallow and FAB to version 3

dpgaspar commented on a change in pull request #9964:
URL: https://github.com/apache/incubator-superset/pull/9964#discussion_r450068858



##########
File path: superset/charts/api.py
##########
@@ -446,13 +451,13 @@ def data(self) -> Response:
         else:
             return self.response_400(message="Request is not JSON")
         try:
-            query_context, errors = ChartDataQueryContextSchema().load(json_body)
-            if errors:
-                return self.response_400(
-                    message=_("Request is incorrect: %(error)s", error=errors)
-                )
+            query_context = ChartDataQueryContextSchema().load(json_body)
         except KeyError:
             return self.response_400(message="Request is incorrect")
+        except ValidationError as err:
+            return self.response_400(
+                _("Request is incorrect: %(error)s", error=err.messages)
+            )

Review comment:
       Yes it seems weird, this may possible come from our custom `post_load` https://github.com/apache/incubator-superset/blob/master/superset/charts/schemas.py#L736 and then from https://github.com/apache/incubator-superset/blob/master/superset/common/query_context.py#L57




----------------------------------------------------------------
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