mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-17 03:44:20 +03:00
Prevent failing on api errors
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user