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

Function extractInstantlyError

apps/sim/tools/instantly/utils.ts:345–350  ·  view source on GitHub ↗
(value: unknown, fallback: string)

Source from the content-addressed store, hash-verified

343}
344
345function extractInstantlyError(value: unknown, fallback: string): string {
346 const data = asRecord(value)
347 if (typeof data.message === 'string') return data.message
348 if (typeof data.error === 'string') return data.error
349 return fallback
350}
351
352function asString(value: unknown): string | null {
353 return typeof value === 'string' ? value : null

Callers 1

parseInstantlyResponseFunction · 0.70

Calls 1

asRecordFunction · 0.70

Tested by

no test coverage detected