mistercrunch commented on a change in pull request #7764: Show generic error 
msg and hide stacktrace if feature flag is enabled
URL: 
https://github.com/apache/incubator-superset/pull/7764#discussion_r296930116
 
 

 ##########
 File path: superset/views/base.py
 ##########
 @@ -63,9 +63,12 @@ def get_error_msg():
 
 
 def json_error_response(msg=None, status=500, stacktrace=None, payload=None, 
link=None):
+    stack_enabled = conf.get('SHOW_STACKTRACE')
+    if not stack_enabled:
+        msg = 'An error has occurred.'
 
 Review comment:
   If a `msg` is passed we should just use it regardless of `SHOW_STACKTRACE`. 
`SHOW_STACKTRACE` should only affect the `stacktrace` key in the payload, not 
the msg itself.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to