From c02370e38fabb581698baa00e1ddd3da93dc07fa Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Thu, 9 Nov 2023 20:26:15 +0530 Subject: [PATCH] fix: shopify redis metric when there is no data returned for a key (#2811) fix: shopfify redis metric when there is no data returned for a key --- src/v0/sources/shopify/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v0/sources/shopify/util.js b/src/v0/sources/shopify/util.js index 0d81ddc185..2521e9cb9d 100644 --- a/src/v0/sources/shopify/util.js +++ b/src/v0/sources/shopify/util.js @@ -32,7 +32,7 @@ const getDataFromRedis = async (key, metricMetadata) => { ...metricMetadata, }); const redisData = await RedisDB.getVal(key); - if (redisData === null) { + if (redisData === null || (typeof redisData === "object" && Object.keys(redisData).length === 0)) { stats.increment('shopify_redis_no_val', { ...metricMetadata, });