mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
[payload] Set status code on error rather than query status
This commit is contained in:
parent
b63dc91cd1
commit
1e8cd0e61e
@ -1084,7 +1084,10 @@ class Superset(BaseSupersetView):
|
||||
return json_error_response(utils.error_msg_from_exception(e))
|
||||
|
||||
status = 200
|
||||
if payload.get('status') == QueryStatus.FAILED:
|
||||
if (
|
||||
payload.get('status') == QueryStatus.FAILED or
|
||||
payload.get('error') is not None
|
||||
):
|
||||
status = 400
|
||||
|
||||
return json_success(viz_obj.json_dumps(payload), status=status)
|
||||
|
Loading…
Reference in New Issue
Block a user