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

Function createTransformedErrorFromErrorInfo

apps/sim/tools/index.ts:839–848  ·  view source on GitHub ↗

* Create an Error instance from errorInfo and attach useful context * Uses the error extractor registry to find the best error message

(errorInfo?: ErrorInfo, extractorId?: string)

Source from the content-addressed store, hash-verified

837 * Uses the error extractor registry to find the best error message
838 */
839function createTransformedErrorFromErrorInfo(errorInfo?: ErrorInfo, extractorId?: string): Error {
840 const message = extractErrorMessage(errorInfo, extractorId)
841 const transformed = new Error(message)
842 Object.assign(transformed, {
843 status: errorInfo?.status,
844 statusText: errorInfo?.statusText,
845 data: errorInfo?.data,
846 })
847 return transformed
848}
849
850/**
851 * Process file outputs for a tool result if execution context is available

Callers 1

executeToolRequestFunction · 0.85

Calls 1

extractErrorMessageFunction · 0.90

Tested by

no test coverage detected