From c39f2eda8c95f9ee1ba772d34e727404b7614842 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Wed, 11 Sep 2024 05:16:55 +0200 Subject: [PATCH] Improved handling of unavailable/deleted vidble videos --- src/methods/vidbleVideo.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/methods/vidbleVideo.js b/src/methods/vidbleVideo.js index 7b81706..33ff2ad 100644 --- a/src/methods/vidbleVideo.js +++ b/src/methods/vidbleVideo.js @@ -18,6 +18,10 @@ function vidbleVideo(post) { const source = resource.attr('src'); const type = resource.attr('type'); + if(!source || !type) { + throw new Error(`Failed to retrieve (likely removed) vidble video '${post.host.id}'`); + } + return { album: null, items: [{