docs: def error_response(error_type="Internal server error",
                     error_text=None,
                     status=400,
                     participant=None):
      """Return a generic server error response."""
      traceback.print_exc()
      print("Error: {}.".format(error_type))
  
      page = error_page(
          error_text=error_text,
          error_type=error_type,
          participant=participant)
  
      data = {
          "status": "error",
          "html": page
      }
      return Response(dumps(data), status=status, mimetype='application/json')