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

Function extractErrorMessage

apps/sim/tools/error-extractors.ts:288–304  ·  view source on GitHub ↗
(errorInfo?: ErrorInfo, extractorId?: string)

Source from the content-addressed store, hash-verified

286}
287
288export function extractErrorMessage(errorInfo?: ErrorInfo, extractorId?: string): string {
289 if (extractorId) {
290 return extractErrorMessageWithId(errorInfo, extractorId)
291 }
292
293 // Backwards compatibility
294 for (const extractor of ERROR_EXTRACTORS) {
295 try {
296 const message = extractor.extract(errorInfo)
297 if (message?.trim()) {
298 return message
299 }
300 } catch (error) {}
301 }
302
303 return `Request failed with status ${errorInfo?.status || 'unknown'}`
304}
305
306export const ErrorExtractorId = {
307 ATLASSIAN_ERRORS: 'atlassian-errors',

Callers 3

executeRequestFunction · 0.90

Calls 1

Tested by

no test coverage detected