error out of metadata service errors

This commit is contained in:
localhost 2026-03-02 18:01:00 +01:00
parent ec94d4b441
commit c5e6692935
1 changed files with 4 additions and 0 deletions

View File

@ -130,6 +130,10 @@ app.ws('/save', {
}
const data = await getVideo(videoId)
if (data.error) {
return sendError(ws, 'Unable to retrieve video info from YouTube. Please try again later.')
}
const slopScore = await parseSlop(videoId, data.videoDetails.title,
(data.microformat.playerMicroformatRenderer.description?.simpleText || '').replaceAll('\n', '<br>'))