villebro commented on a change in pull request #9056: Do not show stacktraces 
on some intentionally-thrown errors
URL: 
https://github.com/apache/incubator-superset/pull/9056#discussion_r374763115
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -1363,7 +1363,9 @@ def testconn(self):
         except Exception as e:
             logging.exception(e)
             return json_error_response(
-                "Connection failed!\n\n" "The error message returned 
was:\n{}".format(e)
+                "Connection failed!\n\n"
+                "The error message returned was:\n{}".format(e),
 
 Review comment:
   Sorry, I might have been unclear in my comment. What I meant to say was that 
in the above case I think using an f-string should be ok, and that f-strings 
should mainly be avoided in logging messages. The same applies to translations, 
in which variable text should not be burned into the message prior to 
translation.

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