Skip to content

Commit e6e182f

Browse files
authored
Merge pull request #762 from DIRACGridBot/cherry-pick-2-e7a6f6c1-integration
[sweep:integration] fix: do not display the exception in the web browser
2 parents 6d25d9c + b947a3d commit e6e182f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/WebAppDIRAC/Lib/WebHandler.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,8 @@ def write_error(self, status_code, **kwargs):
305305
if "exc_info" in kwargs:
306306
ex = kwargs["exc_info"][1]
307307
trace = traceback.format_exception(*kwargs["exc_info"])
308-
if not isinstance(ex, WErr):
309-
data += "\n".join(trace)
310-
else:
311-
if self.settings.get("debug"):
312-
self.log.error("Request ended in error:\n %s" % "\n ".join(trace))
308+
self.log.error("Request ended in error:\n %s" % "\n ".join(trace))
309+
if isinstance(ex, WErr):
313310
data = ex.msg
314311
if isinstance(data, dict):
315312
cType = "application/json"

0 commit comments

Comments
 (0)