diff --git a/packages/api/src/jobs/score_library_item.ts b/packages/api/src/jobs/score_library_item.ts index 2e89f9955..a3f0b9bd5 100644 --- a/packages/api/src/jobs/score_library_item.ts +++ b/packages/api/src/jobs/score_library_item.ts @@ -97,24 +97,22 @@ export const scoreLibraryItem = async ( items: itemFeatures, }) - logger.info('Scores', scores) - const score = scores[libraryItem.id]['score'] + const score = scores[libraryItem.id].score if (!score) { logger.error('Failed to score library item', data) - throw new Error('Failed to score library item') + } else { + await updateLibraryItem( + libraryItem.id, + { + score, + }, + userId, + undefined, + true + ) + logger.info('Library item score updated', data) } - await updateLibraryItem( - libraryItem.id, - { - score, - }, - userId, - undefined, - true - ) - logger.info('Library item scored', data) - try { await enqueueUpdateHomeJob({ userId,