MCPcopy Create free account
hub / github.com/Superflows-AI/superflows / getErrorMessage

Function getErrorMessage

components/playground.tsx:241–260  ·  view source on GitHub ↗
(
  numActions: number,
  apis: Api[] | null,
  mockApiResponses: boolean | null,
  chatToDocsEnabled: boolean,
)

Source from the content-addressed store, hash-verified

239}
240
241function getErrorMessage(
242 numActions: number,
243 apis: Api[] | null,
244 mockApiResponses: boolean | null,
245 chatToDocsEnabled: boolean,
246): string {
247 // Error message is delivered in stages so that the user can fix one thing at a time
248 if (numActions === 0 && !chatToDocsEnabled)
249 return "You need to add actions (Actions tab)";
250
251 if (
252 apis?.length &&
253 apis.some((api) => !api.api_host) &&
254 !mockApiResponses &&
255 !chatToDocsEnabled
256 )
257 return "You need to add API hosts (Actions tab), or turn on mock API responses.";
258
259 return "";
260}

Callers 1

PlaygroundFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected