fix: cloudflare edge case (#1309)

This commit is contained in:
cthomas
2026-03-09 19:33:26 -07:00
committed by GitHub
parent b9c4b3068f
commit 4222664a55

View File

@@ -5519,10 +5519,14 @@ export default function App({
// When lastRunId is present, prefer the richer server-side error details below.
if (fallbackError && !lastRunId) {
setNetworkPhase("error");
const errorMsg = `Stream error: ${fallbackError}`;
const formattedFallback = formatErrorDetails(
fallbackError,
agentIdRef.current,
);
const errorMsg = `Stream error: ${formattedFallback}`;
appendError(errorMsg, {
errorType: "FallbackError",
errorMessage: fallbackError,
errorMessage: formatTelemetryErrorMessage(fallbackError),
context: "message_stream",
});
appendError(ERROR_FEEDBACK_HINT, true);