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



##########
File path: superset/charts/api.py
##########
@@ -469,20 +471,21 @@ def data(self) -> Response:
             return self.response_400(
                 message=_("Request is incorrect: %(error)s", 
error=error.messages)
             )
+
+        # ACL control
         try:
             query_context.raise_for_access()
         except SupersetSecurityException:
             return self.response_401()
+
+        # get all query payload
         payload = query_context.get_payload()
         for query in payload:
             if query.get("error"):
                 return self.response_400(message=f"Error: {query['error']}")
-        result_format = query_context.result_format
-
-        response = self.response_400(
-            message=f"Unsupported result_format: {result_format}"
-        )
 
+        result_format = query_context.result_format
+        response = None

Review comment:
       Not sure if all errors are caught by marshmallow on this. Also setting 
`response = None` is dangerous has it may end up has a Flask response
   
   @villebro any thought on this?




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

Reply via email to