Skip to content

Commit 14c7346

Browse files
committed
fix(docservice): 🐛 satisfy no-unused-vars on intentionally-unused catch
CI's ESLint config requires unused caught errors to be _-prefixed. Six swallowed-error catch blocks used `err` without referencing it. Assisted-by: ClaudeCode:claude-sonnet-5 Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
1 parent 279a0b4 commit 14c7346

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎DocService/sources/editorDataRedisPresence.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function createPresenceStore(redis, prefix, ttlSeconds, memoryFallback) {
8383
await redis.presenceWriteScript(hashKey, expKey, userId, userInfo, expiresAt, ttlSeconds * NATIVE_TTL_MULTIPLIER * 1000);
8484
try {
8585
await docExpSweep.track(ctx.tenant, docId, expiresAt);
86-
} catch (err) {
86+
} catch (_err) {
8787
// The write above already landed and is genuinely live and
8888
// cross-replica-visible (and self-expires regardless, via the
8989
// PEXPIRE inside presenceWriteScript) - a failure here only means
@@ -104,7 +104,7 @@ function createPresenceStore(redis, prefix, ttlSeconds, memoryFallback) {
104104
async function failOpen(fn, fallback) {
105105
try {
106106
return await fn();
107-
} catch (err) {
107+
} catch (_err) {
108108
return fallback();
109109
}
110110
}
@@ -141,7 +141,7 @@ function createPresenceStore(redis, prefix, ttlSeconds, memoryFallback) {
141141
}
142142
try {
143143
await docExpSweep.track(ctx.tenant, docId, expiresAt);
144-
} catch (err) {
144+
} catch (_err) {
145145
// Same reasoning as writeAndTrack: the refresh itself already
146146
// landed in Redis - don't let a sweep-tracking failure alone
147147
// fall this call back to the memory backend.

‎DocService/sources/editorDataRedisSaveLock.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function createSaveLockStore(redis, prefix) {
6868
const key = buildKey(keyPrefix, ctx.tenant, docId);
6969
const res = await redis.saveLockScript(key, userId, ttlToMs(ttl));
7070
return res === 1;
71-
} catch (err) {
71+
} catch (_err) {
7272
return false;
7373
}
7474
}
@@ -84,7 +84,7 @@ function createSaveLockStore(redis, prefix) {
8484
if (code === 1) return UNLOCK_RES.UNLOCKED;
8585
if (code === 0) return UNLOCK_RES.LOCKED;
8686
return UNLOCK_RES.EMPTY;
87-
} catch (err) {
87+
} catch (_err) {
8888
return UNLOCK_RES.LOCKED;
8989
}
9090
}
@@ -107,7 +107,7 @@ function createSaveLockStore(redis, prefix) {
107107
buildKey(lockSavePrefix, ctx.tenant, docId),
108108
buildKey(lockAuthPrefix, ctx.tenant, docId)
109109
);
110-
} catch (err) {
110+
} catch (_err) {
111111
// Intentionally swallowed - see above.
112112
}
113113
},

0 commit comments

Comments
 (0)