Skip to content

Commit 5f194bc

Browse files
fix(agents): Add error boundary around ModelsTable (#110509)
Wrap `ModelsTable` with `<ErrorBoundary mini>` on the agent models landing page so that rendering errors (e.g. null `modelId` hitting `.toLowerCase()`) are contained within the table instead of crashing the entire page. This follows the existing pattern of wrapping table consumers at the call site. The widget footer error boundary was added in #110506 but `ModelsTable` (a standalone `GridEditable` table) was unprotected.
1 parent ed11534 commit 5f194bc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

static/app/views/insights/agentModels/views/modelsLandingPage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {Fragment} from 'react';
22

33
import {Flex} from '@sentry/scraps/layout';
44

5+
import ErrorBoundary from 'sentry/components/errorBoundary';
56
import * as Layout from 'sentry/components/layouts/thirds';
67
import type {DatePageFilterProps} from 'sentry/components/pageFilters/date/datePageFilter';
78
import {DatePageFilter} from 'sentry/components/pageFilters/date/datePageFilter';
@@ -103,7 +104,9 @@ function AgentModelsLandingPage({datePageFilterProps}: AgentModelsLandingPagePro
103104
<TokenTypesWidget />
104105
</WidgetGrid.Position3>
105106
</WidgetGrid>
106-
<ModelsTable />
107+
<ErrorBoundary mini>
108+
<ModelsTable />
109+
</ErrorBoundary>
107110
</Fragment>
108111
)}
109112
</ModuleLayout.Full>

0 commit comments

Comments
 (0)