Skip to content

Commit 4962ed6

Browse files
committed
fix: add response.ok guard to multimodal-embeddings transformResponse
1 parent 80e0099 commit 4962ed6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

apps/sim/tools/voyageai/multimodal-embeddings.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ export const multimodalEmbeddingsTool: ToolConfig<
8686

8787
transformResponse: async (response) => {
8888
const data = await response.json()
89+
if (!response.ok || !data.output) {
90+
throw new Error(data.error ?? data.detail ?? `VoyageAI API error: ${response.status}`)
91+
}
8992
return {
9093
success: true,
9194
output: {

0 commit comments

Comments
 (0)