mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Show generic error msg and hide stacktrace if feature flag is enabled (#7764)
* Show generic error msg and hide stacktrace if feature flag is enabled * SHOW_STACKTRACE should not modify msg
This commit is contained in:
committed by
Maxime Beauchemin
parent
859d6e7c6a
commit
d06b77c3fd
@@ -65,7 +65,7 @@ def get_error_msg():
|
||||
def json_error_response(msg=None, status=500, stacktrace=None, payload=None, link=None):
|
||||
if not payload:
|
||||
payload = {'error': '{}'.format(msg)}
|
||||
if stacktrace:
|
||||
if stacktrace and conf.get('SHOW_STACKTRACE'):
|
||||
payload['stacktrace'] = stacktrace
|
||||
if link:
|
||||
payload['link'] = link
|
||||
|
||||
Reference in New Issue
Block a user