villebro commented on a change in pull request #10300:
URL:
https://github.com/apache/incubator-superset/pull/10300#discussion_r454232515
##########
File path: superset/charts/api.py
##########
@@ -465,13 +465,16 @@ def data(self) -> Response:
return self.response_400(message="Request is incorrect")
except ValidationError as error:
return self.response_400(
- _("Request is incorrect: %(error)s", error=error.messages)
+ message=_("Request is incorrect: %(error)s",
error=error.messages)
)
try:
query_context.raise_for_access()
except SupersetSecurityException:
return self.response_401()
payload = query_context.get_payload()
+ for query in payload:
+ if query["error"]:
+ return self.response_400(message=f"Error: {query['error']}")
Review comment:
That's a great idea 👍 To unblock `0.37` I'll merge this as-is, but will
improve exception handling after we ship the release.
----------------------------------------------------------------
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]