Prevent failing on api errors

This commit is contained in:
Ajay Ramachandran
2021-06-03 11:29:55 -04:00
parent 10fcc7885f
commit 1e5849f504
3 changed files with 5 additions and 7 deletions

View File

@@ -29,7 +29,8 @@ export class YouTubeAPI {
if (result.ok) {
const data = await result.json();
if (data.error) {
return { err: data.err, data: null };
Logger.warn("CloudTube API Error: " + data.error)
return { err: data.error, data: null };
}
redis.setAsync(redisKey, JSON.stringify(data)).then((result) => {