docs: def register_error_handler(app, handler=None):
      """
      Register error handler
      Registers an exception handler on the app instance for every type of
      exception code werkzeug is aware about.
  
      :param app: flask.Flask - flask application instance
      :param handler: function - the handler
      :return: None
      """
      if not handler:
          handler = default_error_handler
  
      for code in exceptions.default_exceptions.keys():
          app.register_error_handler(code, handler)