{"record":{"id":"03e1dccf5bdba871","repo":"BerriAI/litellm","slug":"e-response-text","errorCode":null,"errorMessage":"{e.response.text}","messagePattern":"\\{e\\.response\\.text\\}","errorType":"http","errorClass":"AnthropicError","httpStatus":null,"severity":"error","filePath":"litellm/llms/anthropic/count_tokens/handler.py","lineNumber":113,"sourceCode":"                raise AnthropicError(\n                    status_code=response.status_code,\n                    message=error_text,\n                )\n\n            anthropic_response: Final = response.json()\n\n            verbose_logger.debug(\"Anthropic response: %s\", anthropic_response)\n\n            # Return Anthropic response directly - no transformation needed\n            return anthropic_response\n\n        except AnthropicError:\n            # Re-raise Anthropic exceptions as-is\n            raise\n        except httpx.HTTPStatusError as e:\n            # HTTP errors - preserve the actual status code\n            verbose_logger.error(\"HTTP error in CountTokens handler: %s\", e)\n            raise AnthropicError(\n                status_code=e.response.status_code,\n                message=e.response.text,\n            )\n        except Exception as e:\n            verbose_logger.error(\"Error in CountTokens handler: %s\", e)\n            raise AnthropicError(\n                status_code=500,\n                message=f\"CountTokens processing error: {e}\",\n            )\n","sourceCodeStart":95,"sourceCodeEnd":123,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/anthropic/count_tokens/handler.py#L95-L123","documentation":"Error \"{e.response.text}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/anthropic/count_tokens/handler.py:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the Anthropic API error response text."],"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"}