code: def test_search_records_with_api_error(
      self,
      mock_httpx_client: httpx.Client,
      status_code: int,
      error_detail: str,
  ):
      dataset_id = uuid.uuid4()
      query = FeedbackRecordsSearchVectorQuery(
          name="test-vector", value=[1, 2, 3]
      )
      max_results = 5
  
      mock_httpx_client.post.return_value = httpx.Response(
          status_code=status_code, json={"detail": error_detail}
      )
  
      with pytest.raises(
          ArApiResponseError, match=error_detail
      ) as exc_info:
          search_records(
              client=mock_httpx_client,
              id=dataset_id,
              vector_query=query,
              limit=max_results,
          )
  
      assert exc_info.value.HTTP_STATUS == status_code
  
file_path: argilla/tests/unit/client/sdk/v1/test_search_records.py
imports: import uuid
  import httpx
  import pytest
  from argilla.client.sdk.commons.errors import ArApiResponseError, BadRequestApiError
  from argilla.client.sdk.v1.datasets.api import search_records
  from argilla.client.sdk.v1.datasets.models import FeedbackRecordsSearchVectorQuery
label_desc: Use image node_id 4 for calling the TestSuiteSearchRecordsSDK obj's underlying member method code with example usage: obj.test_search_records_with_api_error(mock_httpx_client, status_code, error_detail) without return types