puppetlabs/puppet-server — pull request #285 by KevinCorcoran (2014-11-18 22:45:43+00:00)
Title: (SERVER-88) catch errors before they get to Jetty

Add a 'catch-all' middleware to both the Master and CA ring handlers
which catches any Exception, logs it, and returns a simple error message
in the response body. This prevents Exceptions from propagating all the
way out to Jetty - if this happens, Jetty will generate HTML from the
stacktrace and return this to the client.