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:
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue