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

Function getFalAIErrorMessage

apps/sim/app/api/tools/image/route.ts:720–730  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

718}
719
720function getFalAIErrorMessage(error: unknown): string {
721 if (typeof error === 'string') return error
722 if (isRecordLike(error)) {
723 return (
724 getStringProperty(error, 'message') ||
725 getStringProperty(error, 'detail') ||
726 JSON.stringify(error)
727 )
728 }
729 return 'Unknown Fal.ai error'
730}
731
732async function generateWithFalAI(
733 apiKey: string,

Callers 1

generateWithFalAIFunction · 0.70

Calls 2

isRecordLikeFunction · 0.90
getStringPropertyFunction · 0.70

Tested by

no test coverage detected