The django BaseHandler? misses some errors and also the dispatch mechanism in modpython.py and wsgi.py also allows some errors to pass without being caught. I have a patch which attempts to fix this by
1) factorising out the code for 500 errors
2) moving the code that handles request middleware inside the try block in BaseHandler?.get_resonse
3) factorising out the common dispatch code in modpython/wsgi.py into a BaseHandler?.dispatch_request method and at the same time moving the response middleware into a try block in that method.
4) Use the BaseHandler?.dispatch_request method in the ModPythonHandler?/WSGIHandler call to replace common code.