mattbostock / leavediary

LeaveDiary is a web application for tracking annual leave
MIT License
2 stars 0 forks source link

Add custom recovery middleware for Negroni to hide panics from user #30

Closed mattbostock closed 9 years ago

mattbostock commented 9 years ago

Create a new, custom, recovery middleware for Negroni so that:

I'm a little concerned that my making this recovery code more complex (by rendering a pretty error page), we're increasing the risk of panicking while recovering from the original panic.

This might be a good argument for dealing with this higher up the stack (i.e. by configuring Nginx to output a pretty page when a HTTP 5XX occurs), but for now I'm not using Nginx so this will do.

Fixes #16.