diff --git a/src/matrix/calls/group/GroupCall.ts b/src/matrix/calls/group/GroupCall.ts index d700f2a0..25e201e5 100644 --- a/src/matrix/calls/group/GroupCall.ts +++ b/src/matrix/calls/group/GroupCall.ts @@ -94,6 +94,11 @@ export class GroupCall extends EventEmitter<{change: never}> { /** Set between calling join and leave. */ private joinedData?: JoinedData; private errorBoundary = new ErrorBoundary(err => { + if (this.joinedData) { + // in case the error happens in code that does not log, + // log it here to make sure it isn't swallowed + this.joinedData.logItem.log("error at boundary").catch(err); + } this.emitChange(); }); diff --git a/src/matrix/calls/group/Member.ts b/src/matrix/calls/group/Member.ts index 4ceaf46f..257628f5 100644 --- a/src/matrix/calls/group/Member.ts +++ b/src/matrix/calls/group/Member.ts @@ -97,6 +97,11 @@ export class Member { private expireTimeout?: Timeout; private errorBoundary = new ErrorBoundary(err => { this.options.emitUpdate(this, "error"); + if (this.connection) { + // in case the error happens in code that does not log, + // log it here to make sure it isn't swallowed + this.connection.logItem.log("error at boundary").catch(err); + } }); constructor(