From 949b625821cbfbcf2e4b82991269ff5d64fceb69 Mon Sep 17 00:00:00 2001 From: Mia Hsu Date: Thu, 6 Nov 2025 14:49:47 -0800 Subject: [PATCH] fix(aci): fix error state for nonexistent monitor details --- static/app/views/automations/detail.tsx | 8 +++++++- static/app/views/detectors/detail.tsx | 10 ++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/static/app/views/automations/detail.tsx b/static/app/views/automations/detail.tsx index 7c8bb4f3d8fad4..4a72a11a596a48 100644 --- a/static/app/views/automations/detail.tsx +++ b/static/app/views/automations/detail.tsx @@ -175,6 +175,7 @@ function AutomationDetailLoadingStates({automationId}: {automationId: string}) { data: automation, isPending, isError, + error, refetch, } = useAutomationQuery(automationId); @@ -183,7 +184,12 @@ function AutomationDetailLoadingStates({automationId}: {automationId: string}) { } if (isError) { - return ; + return ( + + ); } return ; diff --git a/static/app/views/detectors/detail.tsx b/static/app/views/detectors/detail.tsx index 1b25c4ca2ecf03..4a9f85a9e0b9b0 100644 --- a/static/app/views/detectors/detail.tsx +++ b/static/app/views/detectors/detail.tsx @@ -14,8 +14,10 @@ import {useDetectorQuery} from 'sentry/views/detectors/hooks'; function DetectorDetailsLoadingStates({ detectorId, project, + isFetchingProjects, }: { detectorId: string; + isFetchingProjects: boolean; project: Project | undefined; }) { const { @@ -26,7 +28,7 @@ function DetectorDetailsLoadingStates({ refetch, } = useDetectorQuery(detectorId); - if (isPending || !project) { + if (isPending || isFetchingProjects) { return ; } @@ -67,7 +69,11 @@ export default function DetectorDetails() { id="DetectorDetails-Body" isLoading={isLoading} > - + ); }