Skip to content

Commit

Permalink
add better null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Oct 30, 2024
1 parent 3006714 commit bdc85a9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion apps/event-worker/src/target-scan/gke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,15 @@ const getVClustersForCluster = async (
Status: string;
Created: string;
Version: string;
}>;
}> | null;

if (vclusters == null) {
log.info(
`No vclusters found for cluster: ${cluster.name}/${cluster.id}`,
{ project, clusterName: cluster.name, workspaceId },
);
return [];
}

const clusterTarget = clusterToTarget(
workspaceId,
Expand Down

0 comments on commit bdc85a9

Please sign in to comment.