Skip to content

Commit

Permalink
sweep: DIRACGrid#761 fix: do not display the exception in the web bro…
Browse files Browse the repository at this point in the history
…wser
  • Loading branch information
fstagni authored and web-flow committed Apr 23, 2024
1 parent 6d25d9c commit b947a3d
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 b947a3d

Please sign in to comment.