refs #2616 handle nested exceptions

http409
Natalia Serrano 2025-08-08 13:11:41 +02:00
parent 0d7ef61393
commit 40064be81d
1 changed files with 1 additions and 0 deletions

View File

@ -105,6 +105,7 @@ class HTTPServerHandler(BaseHTTPRequestHandler):
self.sendJsonError(500, exceptionToMessage(e))
else:
arg0 = e.args[0]
while isinstance (arg0, Exception): arg0 = arg0.args[0] ## handle nested exceptions
if type (arg0) is str:
logger.debug ('Message processor for "{}" returned exception string "{}"'.format(path[0], str(e)))
self.sendJsonError (500, exceptionToMessage(e))