fix: silence Cloudflare retry status message in terminal UI (#1214)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
jnjpng
2026-02-27 17:02:05 -08:00
committed by GitHub
parent e0cea19c9f
commit ec3cbbcaee
2 changed files with 41 additions and 34 deletions

View File

@@ -699,14 +699,11 @@ const DEFAULT_RETRY_MESSAGE =
*/
export function getRetryStatusMessage(
errorDetail: string | null | undefined,
): string {
): string | null {
if (!errorDetail) return DEFAULT_RETRY_MESSAGE;
const cloudflareInfo = parseCloudflareEdgeError(errorDetail);
if (cloudflareInfo) {
const codeSegment = cloudflareInfo.code ? ` ${cloudflareInfo.code}` : "";
return `Cloudflare${codeSegment} upstream outage, retrying...`;
}
// Cloudflare edge errors are transient and retried silently — no status line
if (parseCloudflareEdgeError(errorDetail)) return null;
if (checkZaiError(errorDetail)) return "Z.ai API error, retrying...";