diff --git a/docs/oidc-client-ts.api.md b/docs/oidc-client-ts.api.md index 150e770c3..d09915984 100644 --- a/docs/oidc-client-ts.api.md +++ b/docs/oidc-client-ts.api.md @@ -218,7 +218,7 @@ export class Logger { // (undocumented) static info(name: string, ...args: unknown[]): void; // (undocumented) - throw(err: unknown): never; + throw(err: Error): never; // (undocumented) warn(...args: unknown[]): void; // (undocumented) diff --git a/src/SessionMonitor.ts b/src/SessionMonitor.ts index f513754e9..53f288a8a 100644 --- a/src/SessionMonitor.ts +++ b/src/SessionMonitor.ts @@ -18,7 +18,7 @@ export class SessionMonitor { public constructor(private readonly _userManager: UserManager) { if (!_userManager) { - this._logger.throw("No user manager passed to SessionMonitor"); + this._logger.throw(new Error("No user manager passed")); } this._userManager.events.addUserLoaded(this._start); diff --git a/src/utils/Logger.ts b/src/utils/Logger.ts index c28364fd3..a64d325a5 100644 --- a/src/utils/Logger.ts +++ b/src/utils/Logger.ts @@ -89,7 +89,7 @@ export class Logger { } } - public throw(err: unknown): never { + public throw(err: Error): never { this.error(err); throw err; }