code: def _error_result_to_exception(error_result):
      
      reason = error_result.get("reason")
      status_code = _ERROR_REASON_TO_EXCEPTION.get(
          reason, http_client.INTERNAL_SERVER_ERROR
      )
      return exceptions.from_http_status(
          status_code, error_result.get("message", ""), errors=[error_result]
      )
docs: Maps BigQuery error reasons to an exception.
  
      The reasons and their matching HTTP status codes are documented on
      the `troubleshooting errors`_ page.
  
      .. _troubleshooting errors: https://cloud.google.com/bigquery\
          /troubleshooting-errors
  
      :type error_result: Mapping[str, str]
      :param error_result: The error result from BigQuery.
  
      :rtype google.cloud.exceptions.GoogleCloudError:
      :returns: The mapped exception.