docstr: Test that AirflowException is raised if Run Operator fails execution and returns error.
docstr_tok: ["Test","that","AirflowException","is","raised","if","Run","Operator","fails","execution","and","returns","error","."]
code: def test_invalid_response(self):
      """
      Test that AirflowException is raised if Run Operator fails execution and returns error.
      """
      init_kwargs = {
          "task_id": TASK_ID,
          "data_pipeline_name": TEST_DATA_PIPELINE_NAME,
          "project_id": TEST_PROJECTID,
          "location": TEST_LOCATION,
          "gcp_conn_id": TEST_GCP_CONN_ID,
      }
      with pytest.raises(AirflowException):
          RunDataPipelineOperator(**init_kwargs).execute(
              mock.MagicMock()
          ).return_value = {"error": {"message": "example error"}}
  
file_path: airflow/tests/providers/google/cloud/operators/test_datapipeline.py
imports: from __future__ import annotations
  from unittest import mock
  import pytest
  from airflow.exceptions import AirflowException
  from airflow.providers.google.cloud.operators.datapipeline import CreateDataPipelineOperator, RunDataPipelineOperator
label_desc: Use image node_id 6 for calling the TestRunDataPipelineOperator obj's underlying member method code with example usage: obj.test_invalid_response() without return types