From e350956fdc2b9b587d30aa168b8185614f070de1 Mon Sep 17 00:00:00 2001 From: Xin Hao Zhang Date: Thu, 9 Feb 2023 11:22:17 -0500 Subject: [PATCH] ui: add null check to txn details api The txn details api was missing a null check when reading the results of contention information, which lead to the showing of an error when we should just not show any contention details. Epic: none Release note: None --- pkg/ui/workspaces/cluster-ui/src/api/txnInsightsApi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ui/workspaces/cluster-ui/src/api/txnInsightsApi.ts b/pkg/ui/workspaces/cluster-ui/src/api/txnInsightsApi.ts index 43dca17e4a8d..d2cfad0b10ad 100644 --- a/pkg/ui/workspaces/cluster-ui/src/api/txnInsightsApi.ts +++ b/pkg/ui/workspaces/cluster-ui/src/api/txnInsightsApi.ts @@ -647,7 +647,7 @@ export async function getTxnInsightDetailsApi( if (!req.excludeContention && highContention) { const contentionInfo = await getTxnInsightsContentionDetailsApi(req); txnInsightDetails.blockingContentionDetails = - contentionInfo.blockingContentionDetails; + contentionInfo?.blockingContentionDetails; } } catch (e) { errors.contentionErr = e;