refactor: Accept unknown in errorToConsole to drop as Error casts (#2541)
This commit is contained in:
committed by
dermotduffy
parent
fcef48e75a
commit
95f35bd326
@@ -176,7 +176,7 @@ export class ActionsManager implements ActionsExecutor {
|
||||
await actionSet.execute(this._api);
|
||||
forwardHaptic('success');
|
||||
} catch (e) {
|
||||
errorToConsole(e as Error);
|
||||
errorToConsole(e);
|
||||
forwardHaptic('warning');
|
||||
}
|
||||
this._actionsInFlight = this._actionsInFlight.filter((a) => a !== actionSet);
|
||||
|
||||
@@ -37,7 +37,7 @@ export class IssueStateManager implements IssueReadOnlyState {
|
||||
} catch (e) {
|
||||
// Isolate one issue's detection failure so it cannot abort detection
|
||||
// for the rest; log so the cause is visible.
|
||||
errorToConsole(e as Error);
|
||||
errorToConsole(e);
|
||||
}
|
||||
this._logIfNew(issue);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ export class MediaPlayerManager {
|
||||
// Failing to fetch media player information is not considered
|
||||
// sufficiently serious to block card startup -- it is just logged and we
|
||||
// move on.
|
||||
errorToConsole(e as Error);
|
||||
errorToConsole(e);
|
||||
}
|
||||
|
||||
// Filter out entities that are marked as hidden (this information is not
|
||||
|
||||
@@ -103,7 +103,7 @@ export class ViewItemManager {
|
||||
try {
|
||||
url = await homeAssistantGetSignedURLIfNecessary(hass, endpoint);
|
||||
} catch (e) {
|
||||
errorToConsole(e as Error);
|
||||
errorToConsole(e);
|
||||
url = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user