Middleware for negroni which catches panics and wraps them into a JSON response.