{"record":{"id":"ed5a0197e360d6dd","repo":"BerriAI/litellm","slug":"apiconnectionerror-exception-provider-messag","errorCode":null,"errorMessage":"APIConnectionError: {exception_provider} - {message}","messagePattern":"APIConnectionError: (.+?) - (.+?)","errorType":"exception","errorClass":"APIConnectionError","httpStatus":500,"severity":"error","filePath":"litellm/litellm_core_utils/exception_mapping_utils.py","lineNumber":492,"sourceCode":"                message=f\"Timeout Error: {exception_provider} - {message}\",\n                model=model,\n                llm_provider=custom_llm_provider,\n                litellm_debug_info=extra_information,\n                exception_status_code=original_exception.status_code,\n            )\n        else:\n            raise APIError(\n                status_code=original_exception.status_code,\n                message=f\"APIError: {exception_provider} - {message}\",\n                llm_provider=custom_llm_provider,\n                model=model,\n                request=getattr(original_exception, \"request\", None),\n                litellm_debug_info=extra_information,\n            )\n    else:\n        # if no status code then it is an APIConnectionError: https://github.com/openai/openai-python#handling-errors\n        # exception_mapping_worked = True\n        raise APIConnectionError(\n            message=f\"APIConnectionError: {exception_provider} - {message}\",\n            llm_provider=custom_llm_provider,\n            model=model,\n            litellm_debug_info=extra_information,\n            request=httpx.Request(method=\"POST\", url=\"https://api.openai.com/v1/\"),\n        )\n\n\ndef _map_anthropic_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:","sourceCodeStart":474,"sourceCodeEnd":510,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/litellm_core_utils/exception_mapping_utils.py#L474-L510","documentation":"Error \"APIConnectionError: {exception_provider} - {message}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/litellm_core_utils/exception_mapping_utils.py:492 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check network connectivity to the provider endpoint and api_base."],"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"}