Skip to content

Commit edb2fe8

Browse files
committed
fix(workspace): add granular error boundaries to logs, knowledge, and files panels
Scope a crash in one workspace panel to that panel instead of the whole workspace shell. Each boundary reuses the shared ErrorState component and mirrors the existing tables/settings error.tsx convention.
1 parent 3a143bc commit edb2fe8

3 files changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use client'
2+
3+
import { type ErrorBoundaryProps, ErrorState } from '@/app/workspace/[workspaceId]/components'
4+
5+
export default function FilesError({ error, reset }: ErrorBoundaryProps) {
6+
return (
7+
<ErrorState
8+
error={error}
9+
reset={reset}
10+
title='Failed to load files'
11+
description='Something went wrong while loading your files. Please try again.'
12+
loggerName='FilesError'
13+
/>
14+
)
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use client'
2+
3+
import { type ErrorBoundaryProps, ErrorState } from '@/app/workspace/[workspaceId]/components'
4+
5+
export default function KnowledgeError({ error, reset }: ErrorBoundaryProps) {
6+
return (
7+
<ErrorState
8+
error={error}
9+
reset={reset}
10+
title='Failed to load knowledge'
11+
description='Something went wrong while loading your knowledge bases. Please try again.'
12+
loggerName='KnowledgeError'
13+
/>
14+
)
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use client'
2+
3+
import { type ErrorBoundaryProps, ErrorState } from '@/app/workspace/[workspaceId]/components'
4+
5+
export default function LogsError({ error, reset }: ErrorBoundaryProps) {
6+
return (
7+
<ErrorState
8+
error={error}
9+
reset={reset}
10+
title='Failed to load logs'
11+
description='Something went wrong while loading the logs. Please try again.'
12+
loggerName='LogsError'
13+
/>
14+
)
15+
}

0 commit comments

Comments
 (0)