have our catch-all exception handling push a 500 error

--HG--
branch : AB Testing
This commit is contained in:
David Ormsbee
2012-02-07 14:39:43 -05:00
parent 7218cf4326
commit 18fe892f4f

View File

@@ -1,7 +1,7 @@
import logging
from django.conf import settings
from django.http import HttpResponse
from django.http import HttpResponseServerError
log = logging.getLogger("mitx")
@@ -12,4 +12,4 @@ class ExceptionLoggingMiddleware(object):
if not settings.TEMPLATE_DEBUG:
def process_exception(self, request, exception):
log.exception(exception)
return HttpResponse("Server Error - Please try again later.")
return HttpResponseServerError("Server Error - Please try again later.")