{"record":{"id":"0c5e7d4a24bdc114","repo":"BerriAI/litellm","slug":"this-is-a-mock-rate-limit-error","errorCode":null,"errorMessage":"this is a mock rate limit error","messagePattern":"this is a mock rate limit error","errorType":"http","errorClass":"RateLimitError","httpStatus":429,"severity":"error","filePath":"litellm/llms/anthropic/experimental_pass_through/messages/utils.py","lineNumber":86,"sourceCode":"        ContextWindowExceededError,\n        InternalServerError,\n        RateLimitError,\n    )\n\n    if mock_response == \"litellm.InternalServerError\":\n        raise InternalServerError(\n            message=\"this is a mock internal server error\",\n            llm_provider=\"anthropic\",\n            model=model,\n        )\n    elif mock_response == \"litellm.ContextWindowExceededError\":\n        raise ContextWindowExceededError(\n            message=\"this is a mock context window exceeded error\",\n            llm_provider=\"anthropic\",\n            model=model,\n        )\n    elif mock_response == \"litellm.RateLimitError\":\n        raise RateLimitError(\n            message=\"this is a mock rate limit error\",\n            llm_provider=\"anthropic\",\n            model=model,\n        )\n    return AnthropicMessagesResponse(\n        **{\n            \"content\": [{\"text\": mock_response, \"type\": \"text\"}],\n            \"id\": \"msg_013Zva2CMHLNnXjNJJKqJ2EF\",\n            \"model\": \"claude-sonnet-4-20250514\",\n            \"role\": \"assistant\",\n            \"stop_reason\": \"end_turn\",\n            \"stop_sequence\": None,\n            \"type\": \"message\",\n            \"usage\": {\"input_tokens\": 2095, \"output_tokens\": 503},\n        }\n    )\n","sourceCodeStart":68,"sourceCodeEnd":103,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/anthropic/experimental_pass_through/messages/utils.py#L68-L103","documentation":"Error \"this is a mock rate limit error\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/anthropic/experimental_pass_through/messages/utils.py:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This is a test/mock error raised intentionally; remove the mock trigger from your request or test setup."],"exampleFix":null,"handlingStrategy":null,"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"}