{"record":{"id":"02e393d34746b934","repo":"BerriAI/litellm","slug":"failed-to-import-files-response-text","errorCode":null,"errorMessage":"Failed to import files: {response.text}","messagePattern":"Failed to import files: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/rag/ingestion/vertex_ai_ingestion.py","lineNumber":456,"sourceCode":"\n        client: Final = get_async_httpx_client(\n            llm_provider=httpxSpecialProvider.RAG,\n            params={\"timeout\": 60.0},\n        )\n\n        response: Final = await client.post(\n            url,\n            json=request_body,\n            headers={\n                \"Authorization\": f\"Bearer {access_token}\",\n                \"Content-Type\": \"application/json\",\n            },\n        )\n\n        if response.status_code not in [200, 201]:\n            error_msg: Final = f\"Failed to import files: {response.text}\"\n            verbose_logger.error(error_msg)\n            raise Exception(error_msg)\n\n        response_data: Final = response.json()\n        operation_name: Final = response_data.get(\"name\", \"\")\n\n        verbose_logger.debug(\"Import operation started: %s\", operation_name)\n        return operation_name\n","sourceCodeStart":438,"sourceCodeEnd":463,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/rag/ingestion/vertex_ai_ingestion.py#L438-L463","documentation":"Vertex AI RAG guard: the documents.import call to the corpus returned a non-2xx status (bad corpus name, auth, or malformed request); the API's response text is included in the message.","triggerScenarios":"Thrown at litellm/rag/ingestion/vertex_ai_ingestion.py:456 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the response text; verify the files exist in the corpus and import parameters are valid."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}