def test_add_documents_with_unsupported_modalities(self):
        """
        Test that add documents with unsupported modalities will fail the whole batch.
        """
        documents = [
            {
                "text_field_1": "A private image with a png extension",
                "image_field_1": "https://raw.githubusercontent.com/marqo-ai/marqo/"
                                 "mainline/examples/ImageSearchGuide/data/image1.jpg",
            },
            {
                "text_field_1": "A private video with a png extension",
            }
        ]

        with self.subTest("Unsupported modality in add_documents"):
            with self.assertRaises(MarqoWebError) as e:
                self.client.index(self.unstructured_languagebind_index_name_with_limited_supported_modalities).add_documents(
                    documents=documents,
                    tensor_fields=["text_field_1", "image_field_1"]
                )
            self.assertIn("The model does not support the requested modality", str(e.exception.message))
            self.assertEqual(e.exception.status_code, 400)

        with self.subTest("Unsupported modality in search"):
            with self.assertRaises(MarqoWebError) as e:
                self.client.index(self.unstructured_languagebind_index_name_with_limited_supported_modalities).search(
                    "https://raw.githubusercontent.com/marqo-ai/marqo/mainline/examples/ImageSearchGuide/data/image1.jpg"
                )

            self.assertIn("The model does not support the requested modality", str(e.exception.message))
            self.assertEqual(e.exception.status_code, 400)

        Test that add documents with unsupported modalities will fail the whole batch.
        
tests/api_tests/v1/tests/api_tests/cuda/test_cuda_add_documents_common.py