john-bodley opened a new pull request #4567: [payload] Set status code on error 
rather than query status
URL: https://github.com/apache/incubator-superset/pull/4567
 
 
   @mistercrunch previously you used to raise an 
[exception](https://github.com/apache/incubator-superset/pull/4396/files) if 
there was no-data, which would then get caught 
[here](https://github.com/apache/incubator-superset/blob/master/superset/views/core.py#L1093)
 and thus the non-200 status code would ensure that the error message was 
reported.
   
   When I removed the exception, and instead set the error message (to ensure 
consistency with how other query errors were handled) the exception wasn't 
raised, and the response status code was defined purely on whether the query 
failed or not rather than also checking the presence of an error. 
   
   Note in the future I'll try to take a pass at unifying some of this logic; 
standardizing payloads, determining when exceptions should/shouldn't be thrown, 
etc.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to