{"record":{"id":"7be09555ac4f8245","repo":"BerriAI/litellm","slug":"response-body","errorCode":null,"errorMessage":"{response_body}","messagePattern":"\\{response_body\\}","errorType":"http","errorClass":"AnthropicError","httpStatus":null,"severity":"error","filePath":"litellm/llms/anthropic/chat/handler.py","lineNumber":96,"sourceCode":") -> tuple[Any, httpx.Headers]:\n    if client is None:\n        client = litellm.module_level_aclient\n\n    try:\n        response: Final = await client.post(\n            api_base,\n            headers=headers,\n            data=data,\n            stream=True,\n            timeout=timeout,\n            logging_obj=logging_obj,\n        )\n    except httpx.HTTPStatusError as e:\n        error_headers = getattr(e, \"headers\", None)\n        error_response: Final = getattr(e, \"response\", None)\n        if error_headers is None and error_response:\n            error_headers = getattr(error_response, \"headers\", None)\n        raise AnthropicError(\n            status_code=e.response.status_code,\n            message=await e.response.aread(),\n            headers=error_headers,\n        )\n    except Exception as e:\n        for exception in litellm.LITELLM_EXCEPTION_TYPES:\n            if isinstance(e, exception):\n                raise e\n        raise AnthropicError(status_code=500, message=str(e))\n\n    completion_stream: Final = ModelResponseIterator(\n        streaming_response=response.aiter_lines(),\n        sync_stream=False,\n        json_mode=json_mode,\n        speed=speed,\n        tool_name_reverse_map=tool_name_reverse_map,\n    )\n","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/anthropic/chat/handler.py#L78-L114","documentation":"Error \"{response_body}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/anthropic/chat/handler.py:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the Anthropic response body for the error detail."],"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"}