def test_embed_private_image_proper_error_raised(self):
        """Test that a proper 400 error is raised when trying to embed a private image and have no access."""
        test_content_lists = [
            ("https://d2k91vq0avo7lq.cloudfront.net/ai_hippo_realistic_small", "a single private image url"),
            (["https://d2k91vq0avo7lq.cloudfront.net/ai_hippo_realistic_small", "test"],
             "a list of content with a private image url")
        ]

        for index_name in [self.unstructured_default_image_index.name, self.structured_default_image_index.name]:
            for test_content, msg in test_content_lists:
                with self.subTest(f"{index_name} - {msg}"):
                    with self.assertRaises(InvalidArgError) as e:
                        embed_res = embed(
                            marqo_config=self.config, index_name=index_name,
                            embedding_request=EmbedRequest(
                                content=test_content
                            ),
                            device="cpu"
                        )
                        self.assertIn("Error downloading media file", str(e.exception))
                        self.assertIn("403 Client Error", str(e.exception))
Test that a proper 400 error is raised when trying to embed a private image and have no access.
tests/integ_tests/tensor_search/integ_tests/test_embed.py