mirror of
https://github.com/ansible/awx.git
synced 2026-02-15 18:20:00 -03:30
Added error handling views and templates, added setting to log request errors to a file.
This commit is contained in:
@@ -7,6 +7,7 @@ from django.http import HttpResponse
|
||||
class ExceptionMiddleware(object):
|
||||
|
||||
def process_exception(self, request, exception):
|
||||
# FIXME: Should only format plain text for API exceptions.
|
||||
return HttpResponse(traceback.format_exc(exception), content_type="text/plain", status=500)
|
||||
|
||||
if request.path.startswith('/api/'):
|
||||
# FIXME: For GA, we shouldn't provide this level of detail to the
|
||||
# end user.
|
||||
return HttpResponse(traceback.format_exc(exception), content_type="text/plain", status=500)
|
||||
|
||||
Reference in New Issue
Block a user