Skip to content

Commit

Permalink
fix: do not display the exception in the web browser
Browse files Browse the repository at this point in the history
  • Loading branch information
¨aldbr¨ committed Apr 22, 2024
1 parent e670452 commit 40cf0fa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/WebAppDIRAC/Lib/WebHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,8 @@ def write_error(self, status_code, **kwargs):
if "exc_info" in kwargs:
ex = kwargs["exc_info"][1]
trace = traceback.format_exception(*kwargs["exc_info"])
if not isinstance(ex, WErr):
data += "\n".join(trace)
else:
if self.settings.get("debug"):
self.log.error("Request ended in error:\n %s" % "\n ".join(trace))
self.log.error("Request ended in error:\n %s" % "\n ".join(trace))
if isinstance(ex, WErr):
data = ex.msg
if isinstance(data, dict):
cType = "application/json"
Expand Down

0 comments on commit 40cf0fa

Please sign in to comment.