def test_query_nonHandled_fails(self):
        """
        VespaStatusError error is raised when Vespa responds with a non-handled error status code.
        """
        query_client = VespaClient("http://localhost:8080", "http://localhost:8080",
                                   "http://localhost:8080", "content_default")

        statuses = [400, 500, 504]

        def modified_post(*args, **kwargs):
            status = kwargs.get("status", 200)
            del kwargs["status"]
            resp = httpx.post(*args, **kwargs)
            resp.status_code = status
            return resp

        for status in statuses:
            with self.subTest(status):
                with patch.object(
                        httpx.Client, "post",
                        wraps=functools.partial(modified_post, status=status)
                ):
                    with self.assertRaisesStrict(VespaStatusError):
                        query_client.query(
                            yql="select * from sources * where title contains 'Title 1';"
                        )

        VespaStatusError error is raised when Vespa responds with a non-handled error status code.
        
tests/integ_tests/vespa/test_vespa_client.py