def test_request_http_error(self):
        """Ensures that _request raises ExtendedRequestException on HTTP error."""
        payload = {"prompt": "Hello"}
        response_mock = Mock()
        response_mock.status_code = 500
        response_mock.raise_for_status.side_effect = httpx.HTTPStatusError(
            "Server error", request=None, response=response_mock
        )
        response_mock.text = "Internal Server Error"

        self.client._client.post.return_value = response_mock

        with pytest.raises(ExtendedRequestException) as exc_info:
            self.client._request(payload)

        assert "Request failed" in str(exc_info.value)
        assert exc_info.value.response_text == "Internal Server Error"
Ensures that _request raises ExtendedRequestException on HTTP error.
llama-index-integrations/llms/llama-index-llms-oci-data-science/tests/test_oci_data_science_client.py