refactor: Accept unknown in errorToConsole to drop as Error casts (#2541)
This commit is contained in:
committed by
dermotduffy
parent
fcef48e75a
commit
95f35bd326
@@ -125,7 +125,7 @@ export class AdvancedCameraCardElementsCore extends LitElement {
|
||||
try {
|
||||
element.setConfig(config);
|
||||
} catch (e) {
|
||||
errorToConsole(e as Error, console.error);
|
||||
errorToConsole(e, console.error);
|
||||
throw new AdvancedCameraCardError(localize('error.invalid_elements_config'));
|
||||
}
|
||||
return element;
|
||||
@@ -155,7 +155,7 @@ export class AdvancedCameraCardElementsCore extends LitElement {
|
||||
this._renderedElements = elements;
|
||||
this._root = this._createRoot();
|
||||
} catch (e) {
|
||||
errorToConsole(e as Error);
|
||||
errorToConsole(e);
|
||||
fireAdvancedCameraCardEvent<IssueTriggerEventData>(this, 'issue:trigger', {
|
||||
key: 'config_error',
|
||||
error: new ElementsCreationError(elements),
|
||||
|
||||
@@ -199,7 +199,7 @@ export class AdvancedCameraCardLiveJSMPEG extends LitElement implements MediaPla
|
||||
JSMPEG_URL_SIGN_EXPIRY_SECONDS,
|
||||
);
|
||||
} catch (e) {
|
||||
errorToConsole(e as Error);
|
||||
errorToConsole(e);
|
||||
}
|
||||
const address = response ? convertHTTPAdressToWebsocket(response) : null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user