mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
skip stack trace for normal-ish problems
This commit is contained in:
parent
d3df48b97e
commit
3073d59303
@ -83,13 +83,13 @@ class MitmProxyHandler(http_server.BaseHTTPRequestHandler):
|
||||
self._transition_to_ssl()
|
||||
except Exception as e:
|
||||
try:
|
||||
self.logger.error("problem handling {}: {}".format(repr(self.requestline), e), exc_info=True)
|
||||
self.logger.error("problem handling {}: {}".format(repr(self.requestline), e))
|
||||
if type(e) is socket.timeout:
|
||||
self.send_error(504, str(e))
|
||||
else:
|
||||
self.send_error(500, str(e))
|
||||
except Exception as f:
|
||||
self.logger.warn("failed to send error response ({}) to proxy client: {}".format(e, f), exc_info=True)
|
||||
self.logger.warn("failed to send error response ({}) to proxy client: {}".format(e, f))
|
||||
return
|
||||
|
||||
# Reload!
|
||||
|
Loading…
x
Reference in New Issue
Block a user