Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion static/app/views/automations/detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ function AutomationDetailLoadingStates({automationId}: {automationId: string}) {
data: automation,
isPending,
isError,
error,
refetch,
} = useAutomationQuery(automationId);

Expand All @@ -183,7 +184,12 @@ function AutomationDetailLoadingStates({automationId}: {automationId: string}) {
}

if (isError) {
return <LoadingError onRetry={refetch} />;
return (
<LoadingError
message={error.status === 404 ? t('The alert could not be found.') : undefined}
onRetry={refetch}
/>
);
}

return <AutomationDetailContent automation={automation} />;
Expand Down
10 changes: 8 additions & 2 deletions static/app/views/detectors/detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ import {useDetectorQuery} from 'sentry/views/detectors/hooks';
function DetectorDetailsLoadingStates({
detectorId,
project,
isFetchingProjects,
}: {
detectorId: string;
isFetchingProjects: boolean;
project: Project | undefined;
}) {
const {
Expand All @@ -26,7 +28,7 @@ function DetectorDetailsLoadingStates({
refetch,
} = useDetectorQuery(detectorId);

if (isPending || !project) {
if (isPending || isFetchingProjects) {
return <LoadingIndicator />;
}

Expand Down Expand Up @@ -67,7 +69,11 @@ export default function DetectorDetails() {
id="DetectorDetails-Body"
isLoading={isLoading}
>
<DetectorDetailsLoadingStates detectorId={params.detectorId} project={project} />
<DetectorDetailsLoadingStates
detectorId={params.detectorId}
project={project}
isFetchingProjects={isFetchingProjects}
/>
</VisuallyCompleteWithData>
);
}
Loading