mirror of https://github.com/apache/superset.git
[bugfix] Encode unicode error message response (#5687)
* Fix unicode error message response * Update
This commit is contained in:
parent
80e777823b
commit
ebe585df3d
|
@ -45,7 +45,7 @@ def get_error_msg():
|
||||||
|
|
||||||
def json_error_response(msg=None, status=500, stacktrace=None, payload=None, link=None):
|
def json_error_response(msg=None, status=500, stacktrace=None, payload=None, link=None):
|
||||||
if not payload:
|
if not payload:
|
||||||
payload = {'error': str(msg)}
|
payload = {'error': '{}'.format(msg)}
|
||||||
if stacktrace:
|
if stacktrace:
|
||||||
payload['stacktrace'] = stacktrace
|
payload['stacktrace'] = stacktrace
|
||||||
if link:
|
if link:
|
||||||
|
|
Loading…
Reference in New Issue