diff --git a/packages/core/src/caches/well-known.ts b/packages/core/src/caches/well-known.ts index 7b9f12f62c5..d3ba49981ed 100644 --- a/packages/core/src/caches/well-known.ts +++ b/packages/core/src/caches/well-known.ts @@ -89,15 +89,16 @@ export class WellKnownCache { /** * Get value from the inner cache store for the given type and key. - * Note: Format errors will be silently caught and result an `undefined` return. + * Note: Redis connection and format errors will be silently caught and result an `undefined` return. */ async get( type: Type, key: string ): Promise> { - const data = await this.cacheStore.get(this.cacheKey(type, key)); - - return trySafe(() => getValueGuard(type).parse(JSON.parse(data ?? ''))); + return trySafe(async () => { + const data = await this.cacheStore.get(this.cacheKey(type, key)); + return getValueGuard(type).parse(JSON.parse(data ?? '')); + }); } /**