Revert "fix error with errors"

This reverts commit 7601a1d4bf.
This commit is contained in:
Michael C
2021-08-28 01:53:53 -04:00
parent e53f65f324
commit 9f7abf1865
17 changed files with 29 additions and 29 deletions

View File

@@ -53,20 +53,20 @@ class Logger {
}
}
error(str: string | Error) {
error(str: string) {
this.log(LogLevel.ERROR, str);
}
warn(str: string | Error) {
warn(str: string) {
this.log(LogLevel.WARN, str);
}
info(str: string | Error) {
info(str: string) {
this.log(LogLevel.INFO, str);
}
debug(str: string | Error) {
debug(str: string) {
this.log(LogLevel.DEBUG, str);
}
private log(level: LogLevel, str: string | Error) {
private log(level: LogLevel, str: string) {
if (!this._settings[level]) {
return;
}

View File

@@ -20,7 +20,7 @@ export class YouTubeAPI {
return { err: null, data: JSON.parse(data) };
}
} catch (err) {
return { err, data: null };
return { err: err as string | boolean, data: null };
}
}
@@ -45,7 +45,7 @@ export class YouTubeAPI {
return { err: result.statusText, data: null };
}
} catch (err) {
return {err, data: null};
return {err: err as string | boolean, data: null};
}
}
}