{"record":{"id":"ad80d11a14020fea","repo":"BerriAI/litellm","slug":"failed-to-parse-azure-di-operation-response-e","errorCode":null,"errorMessage":"Failed to parse Azure DI operation response: {e}","messagePattern":"Failed to parse Azure DI operation response: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/azure_ai/ocr/document_intelligence/transformation.py","lineNumber":495,"sourceCode":"            status: Final = result.get(\"status\")\n\n            verbose_logger.debug(\"Azure DI operation status: %s\", status)\n\n            if status == \"succeeded\":\n                return \"succeeded\"\n            elif status == \"failed\":\n                error_msg: Final = result.get(\"error\", {}).get(\"message\", \"Unknown error\")\n                raise ValueError(f\"Azure Document Intelligence analysis failed: {error_msg}\")\n            elif status in [\"running\", \"notStarted\"]:\n                return \"running\"\n            else:\n                raise ValueError(f\"Unknown operation status: {status}\")\n\n        except Exception as e:\n            if \"succeeded\" in str(e) or \"failed\" in str(e):\n                raise\n            # If we can't parse JSON, something went wrong\n            raise ValueError(f\"Failed to parse Azure DI operation response: {e}\")\n\n    def _poll_operation_sync(\n        self,\n        operation_url: str,\n        headers: dict[str, str],\n        timeout_secs: int,\n    ) -> httpx.Response:\n        \"\"\"\n        Poll Azure Document Intelligence operation until completion (sync).\n\n        Azure DI POST returns 202 with Operation-Location header.\n        We need to poll that URL until status is \"succeeded\" or \"failed\".\n\n        Args:\n            operation_url: The Operation-Location URL to poll\n            headers: Request headers (including auth)\n            timeout_secs: Total timeout in seconds\n","sourceCodeStart":477,"sourceCodeEnd":513,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/azure_ai/ocr/document_intelligence/transformation.py#L477-L513","documentation":"Error \"Failed to parse Azure DI operation response: {e}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/azure_ai/ocr/document_intelligence/transformation.py:495 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the operation response body; it failed to parse. Verify api_version compatibility."],"exampleFix":null,"handlingStrategy":null,"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-23T08:17:48.524Z"}