{"record":{"id":"a845f48c7345cdc2","repo":"BerriAI/litellm","slug":"polling-timed-out-after-max-wait-seconds","errorCode":null,"errorMessage":"Polling timed out after {max_wait} seconds","messagePattern":"Polling timed out after (.+?) seconds","errorType":"exception","errorClass":"BlackForestLabsError","httpStatus":408,"severity":"error","filePath":"litellm/llms/black_forest_labs/image_edit/handler.py","lineNumber":379,"sourceCode":"\n            verbose_logger.debug(\"BFL poll status: %s\", status)\n\n            if status == \"Ready\":\n                return response\n            elif status in [\n                \"Error\",\n                \"Failed\",\n                \"Content Moderated\",\n                \"Request Moderated\",\n            ]:\n                raise BlackForestLabsError(\n                    status_code=400,\n                    message=f\"Image generation failed: {status}\",\n                )\n\n            time.sleep(interval)\n\n        raise BlackForestLabsError(\n            status_code=408,\n            message=f\"Polling timed out after {max_wait} seconds\",\n        )\n\n    async def _poll_for_result_async(\n        self,\n        initial_response: httpx.Response,\n        headers: dict,\n        async_client: AsyncHTTPHandler,\n        max_wait: float = DEFAULT_MAX_POLLING_TIME,\n        interval: float = DEFAULT_POLLING_INTERVAL,\n        timeout: float | httpx.Timeout | None = None,\n    ) -> httpx.Response:\n        \"\"\"\n        Poll BFL API until result is ready (async version).\n        \"\"\"\n        # Validate initial response status code\n        if initial_response.status_code >= 400:","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/black_forest_labs/image_edit/handler.py#L361-L397","documentation":"Error \"Polling timed out after {max_wait} seconds\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/black_forest_labs/image_edit/handler.py:379 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Increase max_wait or check the BFL job status manually."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}