Skip to content

Commit 2f79d10

Browse files
committed
feature: prevent error when getting chunks from webhook
1 parent 65ee673 commit 2f79d10

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clients/trieve-shopify-extension/app/processors/getProducts.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,11 @@ export async function sendChunksFromWebhook(
335335
);
336336
});
337337

338-
let dataChunksResolved = await Promise.all(dataChunks);
338+
try {
339+
let dataChunksResolved = await Promise.all(dataChunks);
340+
} catch (e) {
341+
console.error(`Error getting chunks to send to Trieve: ${e}`);
342+
}
339343

340344
for (const batch of chunk_to_size(dataChunksResolved, 120)) {
341345
sendChunksToTrieve(batch, key, datasetId ?? "");

0 commit comments

Comments
 (0)