Session stores last error that was encountered

Also notes if it was related to the last request.