{"record":{"id":"e14a1cf0e265b731","repo":"BerriAI/litellm","slug":"runwayml-image-generation-was-cancelled","errorCode":null,"errorMessage":"RunwayML image generation was cancelled","messagePattern":"RunwayML image generation was cancelled","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/runwayml/image_generation/transformation.py","lineNumber":182,"sourceCode":"\n        Returns:\n            Normalized status string: \"running\", \"succeeded\", or raises on failure\n\n        Raises:\n            ValueError: If task failed or status is unknown\n        \"\"\"\n        status: Final = response_data.get(\"status\", \"\").upper()\n\n        verbose_logger.debug(\"RunwayML task status: %s\", status)\n\n        if status == \"SUCCEEDED\":\n            return \"succeeded\"\n        elif status == \"FAILED\":\n            failure_reason: Final = response_data.get(\"failure\", \"Unknown error\")\n            failure_code: Final = response_data.get(\"failureCode\", \"unknown\")\n            raise ValueError(f\"RunwayML image generation failed: {failure_reason} (code: {failure_code})\")\n        elif status == \"CANCELLED\":\n            raise ValueError(\"RunwayML image generation was cancelled\")\n        elif status in [\"PENDING\", \"RUNNING\", \"THROTTLED\"]:\n            return \"running\"\n        else:\n            raise ValueError(f\"Unknown RunwayML task status: {status}\")\n\n    def _poll_task_sync(\n        self,\n        task_id: str,\n        api_base: str,\n        headers: dict[str, str],\n        timeout_secs: float = 600,\n    ) -> httpx.Response:\n        \"\"\"\n        Poll RunwayML task until completion (sync).\n\n        RunwayML POST returns immediately with a task that has status PENDING/RUNNING.\n        We need to poll GET /v1/tasks/{task_id} until status is SUCCEEDED or FAILED.\n","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/runwayml/image_generation/transformation.py#L164-L200","documentation":"Terminal-state mapping in RunwayML status normalization: the task's status is CANCELLED (user- or system-initiated), so no output will ever be produced and the error distinguishes cancellation from failure.","triggerScenarios":"Triggered when a RunwayML image generation task is cancelled.","commonSituations":"See trigger scenarios.","solutions":["The task was cancelled, possibly by account limits or another request; resubmit the generation.","Check your RunwayML account for cancellations or quota issues."],"exampleFix":"# retry the image generation request.","handlingStrategy":"type-guard","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"}