if view raises exception the `res` variable will not be created, hence you can't do res.content and such