Use custom websocket to avoid needing admin privileges.

This commit is contained in:
Dermot Duffy
2024-08-24 20:00:00 -07:00
parent 5a1d08f3ea
commit 429dd90972
47 changed files with 1219 additions and 874 deletions
+6 -3
View File
@@ -101,14 +101,17 @@ export function contentsChanged(
/**
* Log an error as a warning to the console.
* @param e The Error object.
* @param e The Error-like object.
* @param func The Console func to call.
*/
export function errorToConsole(e: Error, func: CallableFunction = console.warn): void {
export function errorToConsole(
e: Error | { message: unknown },
func: CallableFunction = console.warn,
): void {
if (e instanceof FrigateCardError && e.context) {
func(e, e.context);
} else {
func(e);
func(e.message);
}
}