* 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)
| 837 | * Uses the error extractor registry to find the best error message |
| 838 | */ |
| 839 | function 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 |
no test coverage detected