Skip to content

Commit

Permalink
raise InternalError (WSGI)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschorr authored and pbauer committed May 18, 2018
1 parent 52a0a3d commit 19c9c0b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ZPublisher/httpexceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ def __call__(self, environ, start_response):
# In debug mode, let the web server log a real
# traceback
raise
if environ.get('wsgi.errors') is not None:
# s. https://www.python.org/dev/peps/pep-0333/#id27
# Imho InternalError is the generic error case
# that should not be handled by the application but
# rather the WSGI server. This way the error along with
# the traceback ends up in the concfigured logs.
raise
return self.catch_all_response(exc)(environ, start_response)

def catch_all_response(self, exc):
Expand Down

0 comments on commit 19c9c0b

Please sign in to comment.