{"record":{"id":"7b913eed223bc7b5","repo":"BerriAI/litellm","slug":"error-text","errorCode":null,"errorMessage":"{error_text}","messagePattern":"\\{error_text\\}","errorType":"http","errorClass":"AnthropicError","httpStatus":null,"severity":"error","filePath":"litellm/llms/anthropic/chat/handler.py","lineNumber":297,"sourceCode":"                logging_obj=logging_obj,\n            )\n        except Exception as e:\n            ## LOGGING\n            logging_obj.post_call(\n                input=messages,\n                api_key=api_key,\n                original_response=str(e),\n                additional_args={\"complete_input_dict\": data},\n            )\n            status_code: Final = getattr(e, \"status_code\", 500)\n            error_headers = getattr(e, \"headers\", None)\n            error_text = getattr(e, \"text\", str(e))\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            if error_response and hasattr(error_response, \"text\"):\n                error_text = getattr(error_response, \"text\", error_text)\n            raise AnthropicError(\n                message=error_text,\n                status_code=status_code,\n                headers=error_headers,\n            )\n\n        return provider_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,\n            optional_params=optional_params,\n            litellm_params=litellm_params,\n            encoding=encoding,\n            json_mode=json_mode,\n        )","sourceCodeStart":279,"sourceCodeEnd":315,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/anthropic/chat/handler.py#L279-L315","documentation":"Error \"{error_text}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/anthropic/chat/handler.py:297 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the Anthropic error text 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-15T17:31:12.345Z"}