Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

feat: update llm api error handling from 502 to 500 (#9872)

cthomas7be01d9331b6
diff --git a/letta/server/rest_api/app.py b/letta/server/rest_api/app.py
index 840bf79ec..2a038b276 100644
--- a/letta/server/rest_api/app.py
+++ b/letta/server/rest_api/app.py
@@ -775,7 +775,7 @@ def create_application() -> "FastAPI":
@app.exception_handler(LLMError)
async def llm_error_handler(request: Request, exc: LLMError):
return JSONResponse(
- status_code=502,
+ status_code=500,
content={
"error": {
"type": "llm_error",