From ffdb83213d4549a428a0c1350fdede76228aa2bd Mon Sep 17 00:00:00 2001 From: sumukhswamy Date: Fri, 18 Oct 2024 11:08:22 -0700 Subject: [PATCH] Fix for missing else consition Signed-off-by: sumukhswamy --- server/adaptors/metrics/metrics_analytics_adaptor.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server/adaptors/metrics/metrics_analytics_adaptor.ts b/server/adaptors/metrics/metrics_analytics_adaptor.ts index 10f111d937..0e11abc466 100644 --- a/server/adaptors/metrics/metrics_analytics_adaptor.ts +++ b/server/adaptors/metrics/metrics_analytics_adaptor.ts @@ -14,11 +14,12 @@ export class MetricsAnalyticsAdaptor { body: query, index, }); + } else { + response = await client.callAsCurrentUser('search', { + body: query, + index, + }); } - response = await client.callAsCurrentUser('search', { - body: query, - index, - }); return response; } catch (error) { throw new Error('Fetch Otel Metrics Error:' + error);