Skip to content

Commit

Permalink
ui: add null check to txn details api
Browse files Browse the repository at this point in the history
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
  • Loading branch information
xinhaoz committed Feb 9, 2023
1 parent 5005b50 commit e350956
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ui/workspaces/cluster-ui/src/api/txnInsightsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e350956

Please sign in to comment.