mirror of
https://github.com/wukko/cobalt.git
synced 2025-06-13 05:37:44 +02:00
api/youtube: catch token expiration error
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user