{"record":{"id":"e8959da46e4c316e","repo":"BerriAI/litellm","slug":"failed-to-test-connection-e","errorCode":null,"errorMessage":"Failed to test connection: {e}","messagePattern":"Failed to test connection: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"litellm/proxy/health_endpoints/_health_endpoints.py","lineNumber":1987,"sourceCode":"                prompt=\"test from litellm\",\n                input=[\"test from litellm\"],\n            ),\n            HEALTH_CHECK_TIMEOUT_SECONDS,\n        )\n\n        # Clean the result for display\n        cleaned_result: Final = _clean_endpoint_data({**litellm_params, **result}, details=True)\n\n        return {\n            \"status\": \"error\" if \"error\" in result else \"success\",\n            \"result\": cleaned_result,\n        }\n\n    except HTTPException as e:\n        raise e\n    except Exception as e:\n        verbose_proxy_logger.debug(\"litellm.proxy.health_endpoints.test_model_connection(): Exception occurred - %s\", e)\n        raise HTTPException(\n            status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,\n            detail={\"error\": f\"Failed to test connection: {e}\"},\n        )\n","sourceCodeStart":1969,"sourceCodeEnd":1991,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/health_endpoints/_health_endpoints.py#L1969-L1991","documentation":"Error \"Failed to test connection: {e}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/health_endpoints/_health_endpoints.py:1987 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the underlying exception for the connection failure cause.","Verify the target service credentials, host, and network reachability."],"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"}