MCPcopy
hub / github.com/simstudioai/sim / getWorkflowErrorCode

Function getWorkflowErrorCode

apps/sim/app/api/mcp/serve/[serverId]/route.ts:248–255  ·  view source on GitHub ↗
(status: number, executeResult: Record<string, unknown>)

Source from the content-addressed store, hash-verified

246}
247
248function getWorkflowErrorCode(status: number, executeResult: Record<string, unknown>): ErrorCode {
249 if (status === 499) return ErrorCode.ConnectionClosed
250 if (status === 400) return ErrorCode.InvalidParams
251 if (status === 413 && executeResult.code !== 'workflow_response_too_large') {
252 return ErrorCode.InvalidRequest
253 }
254 return ErrorCode.InternalError
255}
256
257function getToolsListCursor(rpcParams: unknown): string | undefined {
258 if (!rpcParams || typeof rpcParams !== 'object' || !('cursor' in rpcParams)) return undefined

Callers 1

handleToolsCallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected