{"record":{"id":"0c2f57880395bfdf","repo":"BerriAI/litellm","slug":"unknown-operation-status-status","errorCode":null,"errorMessage":"Unknown operation status: {status}","messagePattern":"Unknown operation status: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/azure_ai/ocr/document_intelligence/transformation.py","lineNumber":489,"sourceCode":"\n        Raises:\n            ValueError: If operation failed or status is unknown\n        \"\"\"\n        try:\n            result: Final = response.json()\n            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\".","sourceCodeStart":471,"sourceCodeEnd":507,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/azure_ai/ocr/document_intelligence/transformation.py#L471-L507","documentation":"Error \"Unknown operation status: {status}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/azure_ai/ocr/document_intelligence/transformation.py:489 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Handle the reported operation status; poll again or check the operation in Azure for the unexpected state."],"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"}