LandRegistry/lr-utils — pull request #3 by tsangsimon (2014-11-27 15:17:16+00:00)
Title: Error handling

The following Exceptions: 400, 401, 403, 404, 405, 406, 408, 409, 410, 411, 412, 413, 414, 418, 422, 428, 429, 431, 500, 501, 502, 503 are wrapped in decorators for any app that imports LRUtils.

Declare the ErrorHandler class in the app then any of the above exceptions are caught by LRutils.
It does require that any repo using this will need to have a generic error.html page rather than error specific pages (e.g 404.html)

All the after_request header code is also now defined in lrutils to be useable in all repos. To use the lrutils after_request method do the following.
app.after_request(eh_after_request)