{"record":{"id":"9d1b7e706e1d0fc7","repo":"BerriAI/litellm","slug":"anthropicexception-timeout-error-str","errorCode":null,"errorMessage":"AnthropicException Timeout - {error_str}","messagePattern":"AnthropicException Timeout - (.+?)","errorType":"exception","errorClass":"Timeout","httpStatus":504,"severity":"error","filePath":"litellm/litellm_core_utils/exception_mapping_utils.py","lineNumber":599,"sourceCode":"                model=model,\n                response=getattr(original_exception, \"response\", None),\n            )\n        elif original_exception.status_code == 502:\n            raise BadGatewayError(\n                message=f\"AnthropicException BadGatewayError - {error_str}\",\n                llm_provider=\"anthropic\",\n                model=model,\n                response=getattr(original_exception, \"response\", None),\n            )\n        elif original_exception.status_code == 503:\n            raise litellm.ServiceUnavailableError(\n                message=f\"AnthropicException - {error_str}. Handle with `litellm.ServiceUnavailableError`.\",\n                llm_provider=\"anthropic\",\n                model=model,\n                response=getattr(original_exception, \"response\", None),\n            )\n        elif original_exception.status_code == 504:  # gateway timeout error\n            raise Timeout(\n                message=f\"AnthropicException Timeout - {error_str}\",\n                model=model,\n                llm_provider=\"anthropic\",\n                exception_status_code=original_exception.status_code,\n            )\n\n\ndef _map_replicate_exception(\n    *,\n    model: str,\n    original_exception: _ProviderHTTPException,\n    custom_llm_provider: str,\n    error_str: str,\n    exception_type: str,\n    exception_provider: str,\n    extra_information: str,\n) -> None:\n    if \"Incorrect authentication token\" in error_str:","sourceCodeStart":581,"sourceCodeEnd":617,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/litellm_core_utils/exception_mapping_utils.py#L581-L617","documentation":"Error \"AnthropicException Timeout - {error_str}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/litellm_core_utils/exception_mapping_utils.py:599 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Increase the timeout for the Anthropic request or check connectivity."],"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"}