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