{"record":{"id":"e9abdc266e2aef2f","repo":"BerriAI/litellm","slug":"internal-server-error-e","errorCode":null,"errorMessage":"Internal server error: {e}","messagePattern":"Internal server error: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"litellm/proxy/agent_endpoints/endpoints.py","lineNumber":344,"sourceCode":"                    AGENT_HEALTH_CHECK_GATHER_TIMEOUT_SECONDS,\n                )\n                health_results = [\n                    {\n                        \"agent_id\": agent.agent_id,\n                        \"healthy\": False,\n                        \"error\": \"Health check timed out\",\n                    }\n                    for agent in agents_with_url\n                ]\n            healthy_ids: Final = {result[\"agent_id\"] for result in health_results if result[\"healthy\"]}\n            returned_agents = [agent for agent in agents_with_url if agent.agent_id in healthy_ids] + agents_without_url\n\n        return returned_agents\n    except HTTPException:\n        raise\n    except Exception as e:\n        verbose_proxy_logger.exception(\"litellm.proxy.agent_endpoints.get_agents(): Exception occurred - %s\", e)\n        raise HTTPException(status_code=500, detail={\"error\": f\"Internal server error: {e}\"})\n\n\n#### CRUD ENDPOINTS FOR AGENTS ####\n\nfrom litellm.proxy.agent_endpoints.agent_registry import (\n    agents_table,\n)\nfrom litellm.proxy.agent_endpoints.agent_registry import (\n    global_agent_registry as AGENT_REGISTRY,\n)\n\n\n@router.post(\n    \"/v1/agents\",\n    tags=[\"[beta] A2A Agents\"],\n    dependencies=[Depends(user_api_key_auth)],\n    response_model=AgentResponse,\n)","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/agent_endpoints/endpoints.py#L326-L362","documentation":"Catch-all wrapper raised by an agent management endpoint when an unexpected exception escapes the handler body; the original error's text is embedded in the HTTP 500 detail. It marks an unhandled server-side failure (usually database or serialization) rather than any client-input problem — the chained exception in the logs holds the real cause.","triggerScenarios":"Thrown at litellm/proxy/agent_endpoints/endpoints.py:344 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check proxy logs for the exception detail; validate the request payload."],"exampleFix":"Inspect server logs for the stack trace.","handlingStrategy":"try-catch","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-14T00:17:10.932Z"}