code: def handle_exp_error(exception):
      
      app.logger.error(
          "%s (%s) %s", exception.value, exception.errornum, str(dict(request.args)))
      return exception.error_page(request, CONFIG.get('HIT Configuration',
                                                      'contact_email_on_error'))
docs: Handle errors by sending an error page.