title: How can I implement a custom error handler for all HTTP errors in Flask?
body: <p>In my Flask app, I can easily expand the list of errors handled by a single custom error handler by adding <code>errorhandler</code> decorators for each error code as with</p>
  
  <pre><code>@application.errorhandler(404)
  @application.errorhandler(401)
  @application.errorhandler(500)
  def http_error_handler(error):
      return flask.render_template('error.html', error=error), error.code
  </code></pre>
  
  <p>However this approach requires an explicit decorator for each error code. Is there a way decorate my (single) <code>http_error_handler</code> function so that it handles <em>all</em> HTTP errors?</p>