{"record":{"id":"848ce493d7bbfed4","repo":"BerriAI/litellm","slug":"httpstatuserror-received-status-code-e-response","errorCode":null,"errorMessage":"HTTPStatusError - received status_code={e.response.status_code}, error_message={e.response.text}","messagePattern":"HTTPStatusError - received status_code=(.+?), error_message=(.+?)","errorType":"http","errorClass":"PredibaseError","httpStatus":null,"severity":"error","filePath":"litellm/llms/predibase/chat/handler.py","lineNumber":221,"sourceCode":"        stream,\n        data: dict,\n        optional_params: dict,\n        timeout: float | httpx.Timeout,\n        litellm_params=None,\n        logger_fn=None,\n        headers={},\n        predibase_config=None,\n    ) -> ModelResponse:\n        if predibase_config is None:\n            predibase_config = litellm.PredibaseConfig()\n        async_handler: Final = get_async_httpx_client(\n            llm_provider=litellm.LlmProviders.PREDIBASE,\n            params={\"timeout\": timeout},\n        )\n        try:\n            response: Final = await async_handler.post(api_base, headers=headers, data=json.dumps(data))\n        except httpx.HTTPStatusError as e:\n            raise PredibaseError(\n                status_code=e.response.status_code,\n                message=f\"HTTPStatusError - received status_code={e.response.status_code}, error_message={e.response.text}\",\n            )\n        except Exception as e:\n            for exception in litellm.LITELLM_EXCEPTION_TYPES:\n                if isinstance(e, exception):\n                    raise e\n            raise PredibaseError(\n                status_code=500, message=f\"{e}\"\n            )  # don't use verbose_logger.exception, if exception is raised\n        return predibase_config.transform_response(\n            model=model,\n            raw_response=response,\n            model_response=model_response,\n            logging_obj=logging_obj,\n            api_key=api_key,\n            request_data=data,\n            messages=messages,","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/predibase/chat/handler.py#L203-L239","documentation":"Error-mapping branch on the Predibase chat POST: httpx.HTTPStatusError was raised (raise_for_status), and both the status code and response body are packed into the PredibaseError message for diagnosis.","triggerScenarios":"Triggered when an httpx.HTTPStatusError is raised during a Predibase chat request, e.g. 4xx/5xx from the Predibase API.","commonSituations":"See trigger scenarios.","solutions":["Read the returned status_code and error_message to identify the server-side failure.","For 4xx codes fix authentication or request payload; for 5xx retry with backoff."],"exampleFix":"# retry on 5xx with tenacity; on 401/403 verify PREDIBASE_API_KEY and tenant id.","handlingStrategy":"try-catch","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"}