refactor: Accept unknown in errorToConsole to drop as Error casts (#2541)

This commit is contained in:
Dermot Duffy
2026-06-30 17:45:13 -07:00
committed by dermotduffy
parent fcef48e75a
commit 95f35bd326
19 changed files with 32 additions and 27 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ export class GalleryController {
useCache,
});
} catch (e) {
errorToConsole(e as Error);
errorToConsole(e);
return;
}
@@ -400,7 +400,7 @@ export class MediaFilterController {
try {
metadata = await cameraManager.getMediaMetadata();
} catch (e) {
errorToConsole(e as Error);
errorToConsole(e);
}
if (!metadata) {
return;
+2 -2
View File
@@ -191,7 +191,7 @@ export class SignedURLController implements ReactiveController {
},
);
} catch (e: unknown) {
errorToConsole(e as Error);
errorToConsole(e);
return null;
}
}
@@ -207,7 +207,7 @@ export class SignedURLController implements ReactiveController {
PROXY_URL_SIGN_EXPIRY_SECONDS,
);
} catch (e: unknown) {
errorToConsole(e as Error);
errorToConsole(e);
return null;
}
}
+1 -1
View File
@@ -248,7 +248,7 @@ export class TimelineDataSource {
...(this._showRecordings ? [this._refreshRecordings(window)] : []),
]);
} catch (e) {
errorToConsole(e as Error);
errorToConsole(e);
}
}