refactor: Accept unknown in errorToConsole to drop as Error casts (#2541)
This commit is contained in:
committed by
dermotduffy
parent
fcef48e75a
commit
95f35bd326
@@ -40,7 +40,7 @@ export class DeviceRegistryManager {
|
||||
type: 'config/device_registry/list',
|
||||
});
|
||||
} catch (e) {
|
||||
errorToConsole(e as Error);
|
||||
errorToConsole(e);
|
||||
return;
|
||||
}
|
||||
deviceList.forEach((device) => {
|
||||
|
||||
@@ -35,7 +35,7 @@ export class EntityRegistryManagerLive implements EntityRegistryManager {
|
||||
entity_id: entityID,
|
||||
});
|
||||
} catch (e) {
|
||||
errorToConsole(e as Error);
|
||||
errorToConsole(e);
|
||||
return null;
|
||||
}
|
||||
this._cache.set(entity.entity_id, entity);
|
||||
@@ -79,7 +79,7 @@ export class EntityRegistryManagerLive implements EntityRegistryManager {
|
||||
type: 'config/entity_registry/list',
|
||||
});
|
||||
} catch (e) {
|
||||
errorToConsole(e as Error);
|
||||
errorToConsole(e);
|
||||
return;
|
||||
}
|
||||
entityList.forEach((entity) => {
|
||||
|
||||
@@ -40,7 +40,7 @@ export const resolveMedia = async (
|
||||
try {
|
||||
resolvedMedia = await homeAssistantWSRequest(hass, resolvedMediaSchema, request);
|
||||
} catch (e) {
|
||||
errorToConsole(e as Error);
|
||||
errorToConsole(e);
|
||||
}
|
||||
if (cache && resolvedMedia) {
|
||||
cache.set(mediaContentID, resolvedMedia);
|
||||
|
||||
Reference in New Issue
Block a user