Skip to content

Commit

Permalink
Merge pull request #762 from DIRACGridBot/cherry-pick-2-e7a6f6c1-inte…
Browse files Browse the repository at this point in the history
…gration

[sweep:integration] fix: do not display the exception in the web browser
  • Loading branch information
fstagni authored Apr 23, 2024
2 parents 6d25d9c + b947a3d commit e6e182f
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 e6e182f

Please sign in to comment.