Remove bare catch-and-rethrow blocks in bitbucket and kubernetes plugins

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-04-13 00:35:42 +02:00
parent 774e641e45
commit ed6b53cf83
4 changed files with 18 additions and 25 deletions
@@ -49,13 +49,9 @@ class CombinedClustersSupplier implements KubernetesClustersSupplier {
}): Promise<ClusterDetails[]> {
const clusters = await Promise.all(
this.clusterSuppliers.map(supplier => supplier.getClusters(options)),
)
.then(res => {
return res.flat();
})
.catch(e => {
throw e;
});
).then(res => {
return res.flat();
});
return this.warnDuplicates(clusters);
}