[CherryPy] #1089: no logging of internal errors in server

3 views
Skip to first unread message

CherryPy

unread,
Aug 30, 2011, 11:29:19 AM8/30/11
to cherrypy...@googlegroups.com
#1089: no logging of internal errors in server
-----------------------------------+----------------------------------------
Reporter: kris...@ccpgames.com | Owner: fumanchu
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: wsgiserver | Keywords:
-----------------------------------+----------------------------------------
the WSGIServer will attempt to report internal server errors to the
client. However, if the client isn't listening, there is no recourse to
log these errors somewhere else.
Perhaps it would be wise to reraise them?
The code in question is this (cherrypy.wsgiserver.__init__.py, lines 1289:
{{{
elif errnum not in socket_errors_to_ignore:
if req and not req.sent_headers:
try:
req.simple_response("500 Internal Server Error",
format_exc())
except FatalSSLAlert:
# Close the connection.
return
}}}
and later
{{{
except Exception:
if req and not req.sent_headers:
try:
req.simple_response("500 Internal Server Error",
format_exc())
except FatalSSLAlert:
# Close the connection.
return
}}}

So, an error that can't be delivered to the client will be silently
ignored.
Errors that occur in sending the error to the client do get raised out of
the function, but they trample the original error, of course.

--
Ticket URL: <http://www.cherrypy.org/ticket/1089>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework

CherryPy

unread,
Aug 31, 2011, 7:11:34 AM8/31/11
to cherrypy...@googlegroups.com
#1089: no logging of internal errors in server
-----------------------------------+----------------------------------------
Reporter: kris...@ccpgames.com | Owner: fumanchu
Type: enhancement | Status: new
Priority: normal | Milestone: 3.2
Component: wsgiserver | Resolution:
Keywords: |
-----------------------------------+----------------------------------------
Changes (by kris...@ccpgames.com):

* milestone: => 3.2
Reply all
Reply to author
Forward
0 new messages