mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 04:39:58 +00:00
api/youtube: catch token expiration error
This commit is contained in:
parent
856004366e
commit
0bbf822d70
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue