def test_log_stack_trace_for_base_exceptions_invalid_arg(self):
        """Ensure stack trace is logged for base exceptions, e.g.,InvalidArg"""
        raised_error = base_exceptions.InvalidArgumentError("invalid_arg_msg")
        with patch('marqo.api.route.logger.error') as mock_logger_error:
            with patch("marqo.tensor_search.tensor_search.search", side_effect=raised_error):
                response = self.client.post(f"/indexes/test_index/search", json={
                    "q": "test"
                })
            mock_logger_error.assert_called_once()
            self.assertIn("invalid_arg_msg", str(mock_logger_error.call_args))
Ensure stack trace is logged for base exceptions, e.g.,InvalidArg
tests/integ_tests/tensor_search/test_api.py