Skip to content

Commit

Permalink
fix: Add error handling for cluster details fetch (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadeesha authored Dec 25, 2024
1 parent 4c92614 commit 33344d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/components/breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export async function ClusterBreadcrumbs({
const clusterDetails = await client.getCluster({
headers: { authorization: `Bearer ${await getToken()}` },
params: { clusterId },
}).catch(() => {
return { status: 500, body: { error: "Failed to fetch cluster details" } } as const;
});

if (clusterDetails.status !== 200) {
Expand Down

0 comments on commit 33344d1

Please sign in to comment.