From 05b8dfff188b540cacf62d282f3e14eefebbf47c Mon Sep 17 00:00:00 2001 From: Ashley Date: Sat, 5 Aug 2023 20:44:49 +0000 Subject: [PATCH] add try catch :p --- src/libpoketube/init/pages-api.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libpoketube/init/pages-api.js b/src/libpoketube/init/pages-api.js index 09fb4fe3..04ef5704 100644 --- a/src/libpoketube/init/pages-api.js +++ b/src/libpoketube/init/pages-api.js @@ -67,12 +67,18 @@ module.exports = function (app, config, renderTemplate) { const id = req.query.v; const l = req.query.h; + try { + let url = `https://invid-api.poketube.fun/api/v1/captions/${id}?label=${l}`; let f = await modules.fetch(url); const body = await f.text(); res.send(body); + + } catch { + + } }); app.get("/feeds/videos.xml", async (req, res) => {