MCPcopy Create free account
hub / github.com/simstudioai/sim / isRetryableStreamError

Function isRetryableStreamError

apps/sim/lib/copilot/request/lifecycle/run.ts:1026–1037  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

1024}
1025
1026function isRetryableStreamError(error: unknown): boolean {
1027 if (error instanceof DOMException && error.name === 'AbortError') {
1028 return false
1029 }
1030 if (error instanceof CopilotBackendError) {
1031 return error.status !== undefined && error.status >= 500
1032 }
1033 if (error instanceof TypeError) {
1034 return true
1035 }
1036 return false
1037}
1038
1039function sleepWithAbort(ms: number, abortSignal?: AbortSignal): Promise<void> {
1040 if (!abortSignal) {

Callers 2

runResumeLegWithRetryFunction · 0.85
runCheckpointLoopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected