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:
Rahul Rahul 2019-06-24 23:11:04 -05:00 committed by Maxime Beauchemin
parent 859d6e7c6a
commit d06b77c3fd
1 changed files with 1 additions and 1 deletions

View File

@ -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