def test_hybrid_with_two_errors_returns_both(self):
        """
        If vespa query to the hybrid searcher returns a result with 2 errors, both should be in the error message.
        If all errors are timeout, raise VespaTimeoutError (504).
        If even one error is not timeout, raise VespaStatusError (500).
        """

        # Mock Vespa result with 2 errors
        test_cases = [
            # HTTP 504, first is Vespa 12
            (
                {
                    'root': {
                        'relevance': 1.0,
                        'fields': {'totalCount': 0},
                        'errors': [
                            {
                                'code': 12,
                                'summary': 'Timed out',
                                'source': 'content_default',
                                'message': "Error in execution of chain 'content_default': Chain timed out."
                            },
                            {
                                'code': 4,
                                'summary': 'Invalid query parameter',
                                'message': 'Could not create query from YQL.'
                            }
                        ]
                    }
                },
                504,    # HTTP 504
                False,  # Not a timeout, since 2nd error is not timeout
            ),
            # HTTP 400, second is Vespa 12
            (
                {
                    'root': {
                        'relevance': 1.0,
                        'fields': {'totalCount': 0},
                        'errors': [
                            {
                                'code': 4,
                                'summary': 'Invalid query parameter',
                                'message': 'Could not create query from YQL.'
                            },
                            {
                                'code': 12,
                                'summary': 'Timed out',
                                'source': 'content_default',
                                'message': "Error in execution of chain 'content_default': Chain timed out."
                            }
                        ]
                    }
                },
                400,  # HTTP 400
                False,  # Not a timeout, since 1st error is not timeout
            ),
            # HTTP 504, both Vespa errors 12
            (
                {
                    'root': {
                        'relevance': 1.0,
                        'fields': {'totalCount': 0},
                        'errors': [
                            {
                                'code': 12,
                                'summary': 'Timed out',
                                'source': 'content_default',
                                'message': "Error in execution of chain 'content_default': Chain timed out."
                            },
                            {
                                'code': 12,
                                'summary': 'Timed out',
                                'source': 'content_default',
                                'message': "Error in execution of chain 'content_default': Chain timed out."
                            }
                        ]
                    }
                },
                504,    # HTTP 504
                True    # Timeout, since both errors are timeout
            ),
            # HTTP 400, both Vespa errors 12 but not timeout
            (
                {
                    'root': {
                        'relevance': 1.0,
                        'fields': {'totalCount': 0},
                        'errors': [
                            {
                                'code': 12,
                                'summary': 'Some other error',
                                'source': 'content_default',
                                'message': 'Some error message'
                            },
                            {
                                'code': 12,
                                'summary': 'Some other error',
                                'source': 'content_default',
                                'message': 'Some error message'
                            }
                        ]
                    }
                },
                400,    # HTTP 400
                False    # Not a timeout, since not 504 error code
            ),
            # HTTP 504, first 12, second soft doom
            (
                {
                    'root': {
                        'relevance': 1.0,
                        'fields': {'totalCount': 0},
                        'errors': [
                            {
                                'code': 12,
                                'summary': 'Timed out',
                                'source': 'content_default',
                                'message': "Error in execution of chain 'content_default': Chain timed out."
                            },
                            {
                                'code': 8,
                                'summary': 'Soft doom',
                                'message': 'Search request soft doomed during query setup and initialization.'
                            }
                        ]
                    }
                },
                504,    # HTTP 504
                True    # Timeout, since both errors are timeout
            )
        ]

        for result_dict, vespa_httpx_code, should_be_timeout in test_cases:
            with self.subTest(result_dict=result_dict, vespa_httpx_code=vespa_httpx_code,
                              should_be_timeout=should_be_timeout):
                # If should_be_timeout, raise a VespaTimeoutError (504), else raise a VespaStatusError (500)
                mock_vespa_result = httpx.Response(
                    status_code=vespa_httpx_code,
                    content=json.dumps(result_dict),
                    request=httpx.Request("POST", "http://localhost:8080/test-url/")
                )

                with unittest.mock.patch("httpx.Client.post") as mock_query:
                    mock_query.return_value = mock_vespa_result

                    for index in [self.structured_text_index_score_modifiers, self.semi_structured_default_text_index]:
                        with self.subTest(index=type(index)):
                            with self.assertRaises(vespa_exceptions.VespaStatusError) as e:
                                tensor_search.search(
                                    text='dogs', config=self.config, index_name=index.name,
                                    search_method=SearchMethod.HYBRID
                                )
                            self.assertEqual(should_be_timeout,
                                             isinstance(e.exception, vespa_exceptions.VespaTimeoutError))

                            for error in result_dict["root"]["errors"]:
                                # All error messages should be in final exception
                                self.assertIn(error["message"], str(e.exception))
                                self.assertIn(error["summary"], str(e.exception))

        If vespa query to the hybrid searcher returns a result with 2 errors, both should be in the error message.
        If all errors are timeout, raise VespaTimeoutError (504).
        If even one error is not timeout, raise VespaStatusError (500).
        
tests/integ_tests/tensor_search/integ_tests/test_hybrid_search.py