From 029a79d9a9bbd9b082438c835eceb90f338fe125 Mon Sep 17 00:00:00 2001 From: Peter Newman <180894268+peter-newman-loke@users.noreply.github.com> Date: Tue, 31 Mar 2026 10:39:16 +1100 Subject: [PATCH] Make the Redis store not error if it tries to read data encoded in a way it doesn't recognize. --- src/redis.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/redis.ts b/src/redis.ts index c1eb797..3c65ace 100644 --- a/src/redis.ts +++ b/src/redis.ts @@ -37,7 +37,11 @@ export class RedisCacheStore implements CacheStore { if (rawData === null) return undefined; - return JSON.parse(rawData); + try { + return JSON.parse(rawData); + } catch { + return undefined; + } } async set(key: string, record: StoreEntity): Promise {