Skip to content

Commit

Permalink
fix(dashboards): Don't show erroring dashboards as not found (#21822)
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes authored Apr 24, 2024
1 parent 72bf3ab commit f6681fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/scenes/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function DashboardScene(): JSX.Element {
[setDashboardMode, dashboardMode, placement]
)

if (!dashboard && !itemsLoading && receivedErrorsFromAPI) {
if (!dashboard && !itemsLoading && !receivedErrorsFromAPI) {
return <NotFound object="dashboard" />
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/dashboard/dashboardLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const dashboardLogic = kea<dashboardLogicType>([
return dashboard
} catch (error: any) {
if (error.status === 404) {
throw new Error('Dashboard not found')
return null
}
throw error
}
Expand Down

0 comments on commit f6681fc

Please sign in to comment.