Skip to content

Commit d458b85

Browse files
committed
fix(tools): pass errorExtractor to extractErrorMessage and handle proxy error format
The executor was calling extractErrorMessage without the tool's errorExtractor ID, so the tool-specific extractor was never used. Also add fallback for the internal proxy route error format ({ error: "..." }) which none of the Atlassian-specific patterns matched.
1 parent bce638d commit d458b85

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

apps/sim/tools/utils.server.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@ export async function executeRequest(
6161
}
6262
}
6363

64-
const error = extractErrorMessage({
65-
status: resolvedResponse.status,
66-
statusText: resolvedResponse.statusText,
67-
data: errorData,
68-
})
64+
const error = extractErrorMessage(
65+
{
66+
status: resolvedResponse.status,
67+
statusText: resolvedResponse.statusText,
68+
data: errorData,
69+
},
70+
tool.errorExtractor
71+
)
6972
logger.error(`${toolId} error:`, { error })
7073
throw new Error(error)
7174
}

0 commit comments

Comments
 (0)