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

Function isNetworkError

apps/sim/lib/uploads/utils/file-utils.ts:362–373  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

360 * message because browsers and servers report these without standardized codes.
361 */
362export function isNetworkError(error: unknown): boolean {
363 if (!(error instanceof Error)) return false
364 const message = error.message.toLowerCase()
365 return (
366 message.includes('network') ||
367 message.includes('fetch') ||
368 message.includes('connection') ||
369 message.includes('timeout') ||
370 message.includes('timed out') ||
371 message.includes('econnreset')
372 )
373}
374
375const MIME_TO_EXTENSION: Record<string, string> = {
376 // Images

Callers 2

file-utils.test.tsFile · 0.90
uploadOneFileFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected