Skip to content

Commit 6fccacd

Browse files
fix(status): isolate status endpoint failures
1 parent 165db31 commit 6fccacd

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/status-notice/status-notice.test.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@ describe('StatusNotice', () => {
9393
expect(action?.getAttribute('rel')).toBe('noopener noreferrer')
9494
})
9595

96-
it('throws status query failures instead of hiding them', () => {
96+
it('stays hidden when the optional status query fails', () => {
9797
mockUseStatusPage.mockReturnValue({
9898
data: undefined,
9999
error: new Error('status unavailable'),
100100
})
101101

102-
expect(render).toThrow('status unavailable')
102+
render()
103+
104+
expect(container.textContent).toBe('')
103105
})
104106
})

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/status-notice/status-notice.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@ function StatusAlert() {
3939
}
4040

4141
export function StatusNotice({ preview = false }: StatusNoticeProps) {
42-
const { data, error } = useStatusPage({ enabled: !preview })
43-
44-
if (!preview && error) {
45-
throw error
46-
}
42+
const { data } = useStatusPage({ enabled: !preview })
4743

4844
const status = preview ? PREVIEW_STATUS : data?.status
4945

0 commit comments

Comments
 (0)