{"record":{"id":"bb0633b8de368dfb","repo":"BerriAI/litellm","slug":"image-generation-failed-status","errorCode":null,"errorMessage":"Image generation failed: {status}","messagePattern":"Image generation failed: (.+?)","errorType":"exception","errorClass":"BlackForestLabsError","httpStatus":400,"severity":"error","filePath":"litellm/llms/black_forest_labs/image_edit/handler.py","lineNumber":372,"sourceCode":"                raise BlackForestLabsError(\n                    status_code=response.status_code,\n                    message=f\"Polling failed: {response.text}\",\n                )\n\n            data = response.json()\n            status = data.get(\"status\")\n\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,","sourceCodeStart":354,"sourceCodeEnd":390,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/black_forest_labs/image_edit/handler.py#L354-L390","documentation":"Error \"Image generation failed: {status}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/black_forest_labs/image_edit/handler.py:372 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The BFL image job failed; check inputs and the BFL dashboard for details."],"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-15T22:17:37.221Z"}