Skip to content

Build your personal knowledge base with Trilium Notes

chore(client): improve error handling message in events

Elian Doran181ea31c1cbd
diff --git a/apps/client/src/components/component.ts b/apps/client/src/components/component.ts
index 9a59b96be6..56c9e7b798 100644
--- a/apps/client/src/components/component.ts
+++ b/apps/client/src/components/component.ts
@@ -65,8 +65,8 @@ export class TypedComponent<ChildT extends TypedComponent<ChildT>> {
// don't create promises if not needed (optimization)
return callMethodPromise && childrenPromise ? Promise.all([callMethodPromise, childrenPromise]) : callMethodPromise || childrenPromise;
- } catch (e: any) {
- console.error(`Handling of event '${name}' failed in ${this.constructor.name} with error ${e.message} ${e.stack}`);
+ } catch (e: unknown) {
+ console.error(`Handling of event '${name}' failed in ${this.constructor.name} with error`, e);
return null;
}