From cf94386c9ec64b043ac538169fada9ef84b6cc04 Mon Sep 17 00:00:00 2001 From: Simon Woolf Date: Thu, 7 Nov 2024 19:09:23 +0000 Subject: [PATCH] presence auto-re-enter: use ErrorInfo.cause Co-authored-by: Owen Pearson <48608556+owenpearson@users.noreply.github.com> --- src/common/lib/client/realtimepresence.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/lib/client/realtimepresence.ts b/src/common/lib/client/realtimepresence.ts index 321ab245c..d9cb1b427 100644 --- a/src/common/lib/client/realtimepresence.ts +++ b/src/common/lib/client/realtimepresence.ts @@ -441,8 +441,7 @@ class RealtimePresence extends EventEmitter { // RTP17g1: suppress id if the connId has changed const id = (entry.connectionId === connId) ? entry.id : undefined; this._enterOrUpdateClient(id, entry.clientId, entry.data, 'enter').catch((err) => { - const msg = 'Presence auto-re-enter failed: ' + err.toString(); - const wrappedErr = new ErrorInfo(msg, 91004, 400); + const wrappedErr = new ErrorInfo('Presence auto re-enter failed', 91004, 400, err); Logger.logAction(this.logger, Logger.LOG_ERROR, 'RealtimePresence._ensureMyMembersPresent()', msg); const change = new ChannelStateChange(this.channel.state, this.channel.state, true, false, wrappedErr); this.channel.emit('update', change);