From 0bbf822d70ff29443696902485fb645d6750ff6b Mon Sep 17 00:00:00 2001 From: wukko Date: Sat, 24 Aug 2024 18:34:02 +0600 Subject: [PATCH] api/youtube: catch token expiration error --- api/src/processing/services/youtube.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/src/processing/services/youtube.js b/api/src/processing/services/youtube.js index 5eea581a..c960dd86 100644 --- a/api/src/processing/services/youtube.js +++ b/api/src/processing/services/youtube.js @@ -111,6 +111,8 @@ export default async function(o) { } catch(e) { if (e.message?.endsWith("decipher algorithm")) { return { error: "youtube.decipher" } + } else if (e.message?.includes("refresh access token")) { + return { error: "youtube.token_expired" } } else throw e; }