feat: add 409 retry, error improvements, and queue restoration (#618)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-01-21 14:57:48 -08:00
committed by GitHub
parent 802136c868
commit 6a0bcdd683
5 changed files with 281 additions and 36 deletions

View File

@@ -88,7 +88,10 @@ export function formatErrorDetails(
runId = e.error.run_id;
}
const baseError = detail ? `${e.message}\nDetail: ${detail}` : e.message;
// When detail is available, prefer showing just the detail to avoid redundancy
// (e.message often contains the full JSON body like '409 {"detail":"CONFLICT: ..."}')
const baseError =
detail && typeof detail === "string" ? detail : e.message;
return runId && agentId
? `${baseError}\n${createAgentLink(runId, agentId, conversationId)}`
: baseError;