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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]