MCPcopy Index your code
hub / github.com/simstudioai/sim / isExplicitUserStopError

Function isExplicitUserStopError

apps/sim/lib/copilot/request/otel.ts:62–71  ·  view source on GitHub ↗
(err: unknown)

Source from the content-addressed store, hash-verified

60// AbortError with no identifiable cause, timeout-flavored aborts,
61// arbitrary Error instances) returns false and gets `status=error`.
62export function isExplicitUserStopError(err: unknown): boolean {
63 if (err == null) return false
64 if (typeof err === 'string') return isExplicitStopReason(err)
65 if (typeof err === 'object') {
66 const e = err as { cause?: unknown; message?: unknown }
67 if (isExplicitStopReason(e.cause)) return true
68 if (typeof e.message === 'string' && isExplicitStopReason(e.message)) return true
69 }
70 return false
71}
72
73/**
74 * True iff an HTTP response status code represents a real server-side

Callers 2

markSpanForErrorFunction · 0.85
finishFunction · 0.85

Calls 1

isExplicitStopReasonFunction · 0.90

Tested by

no test coverage detected