﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36243	Potential issue with the defaults.server_error method	Bryant Glisson		"We have the following custom error method:


{{{
@requires_csrf_token
def server_500(request, template_name='views/500.html'):
    return http.HttpResponseServerError(render(request, template_name))
}}}

This works fine, but for standardization purposes, I was going to change the code to the following:


{{{
@requires_csrf_token
def server_500(request, template_name='views/500.html'):
    return defaults.server_error(request, template_name)
}}}


This results in an infinite error loop. The issue is that our 500 template draws on context that is included in context processors. When it is accessed via the first method, the additional context we've provided via these processors is included. When accessed via the default method, this context is not included, resulting in errors, which in turn trigger another 500 error.

I didn't know if this was expected behavior for this method or not, but I wanted to bring it to your attention.
"	Bug	closed	Error reporting	4.2	Normal	needsinfo			Unreviewed	0	0	0	0	0	0
