﻿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
3881	Don't mask server exception with session save exception	hauserx@…	Adrian Holovaty	"Now session is saved even when the server callback method throws an exception. When callback exception is caused by database, sometimes save of session in !SessionMiddleware fails and a new exception is thrown. This new exception is presented instead of technical_500_response.

This new stacktrace gives no information of what is the real cause of the exception, the resulting output may end with something that do not give to much information, like that for postgres:

{{{
File ""C:\Programs\Python\Lib\site-packages\Django-0.95.1-py2.5.egg\django\db\backends\postgresql_psycopg2\base.py"", line 46, in cursor

cursor.execute(""SET TIME ZONE %s"", [settings.TIME_ZONE])

ProgrammingError: current transaction is aborted, commands ignored until end of transaction block
}}}


Question which can be asked is: Should the session state be saved when an exception is thrown from the callback method? In my opinion it shouldn't be, because it means that something unexpected happen. 

I will prepare a patch that will save session only if there was no uncaught exception if it is acceptable solution."	Bug	closed	contrib.sessions	1.3-beta	Normal	fixed		joel@…	Accepted	1	0	0	0	0	0
