async saving to index

This commit is contained in:
Gergő Móricz 2025-06-03 21:16:13 +02:00
parent d1b5e2ef47
commit 60525220a2

View File

@ -20,6 +20,8 @@ export async function sendDocumentToIndex(meta: Meta, document: Document) {
return document; return document;
} }
(async () => {
try {
const normalizedURL = normalizeURLForIndex(meta.url); const normalizedURL = normalizeURLForIndex(meta.url);
const urlHash = await hashURL(normalizedURL); const urlHash = await hashURL(normalizedURL);
@ -70,6 +72,12 @@ export async function sendDocumentToIndex(meta: Meta, document: Document) {
error, error,
}); });
} }
} catch (error) {
meta.logger.error("Failed to save document to index (outer)", {
error,
});
}
})();
return document; return document;
} }