Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿

refactor: update Redis error logging to use info level for fallback scenario

yoginth.com 14866fd3 6336abea

verified
+4 -4
+4 -4
apps/api/src/utils/redis.ts
··· 5 5 6 6 dotenv.config({ override: true }); 7 7 8 - const noRedisError = () => logger.error("[Redis] Redis client not initialized"); 8 + const logNoRedis = () => logger.info("[Redis] No Redis client, using fallback"); 9 9 10 10 let redisClient: null | RedisClientType = null; 11 11 ··· 56 56 expiry = generateSmallExpiry() 57 57 ) => { 58 58 if (!redisClient) { 59 - noRedisError(); 59 + logNoRedis(); 60 60 return; 61 61 } 62 62 ··· 69 69 70 70 export const getRedis = async (key: string) => { 71 71 if (!redisClient) { 72 - noRedisError(); 72 + logNoRedis(); 73 73 return null; 74 74 } 75 75 ··· 78 78 79 79 export const delRedis = async (key: string) => { 80 80 if (!redisClient) { 81 - noRedisError(); 81 + logNoRedis(); 82 82 return null; 83 83 } 84 84