address review comments

Signed-off-by: Jonah Back <jonah@jonahback.com>
This commit is contained in:
Jonah Back
2022-07-05 10:19:46 -07:00
parent 40de11b8f5
commit f6216b850e
@@ -50,7 +50,7 @@ export class AwsEKSClusterProcessor implements CatalogProcessor {
normalizeName(name: string): string {
return name
.trim()
.toLocaleLowerCase()
.toLocaleLowerCase('en-US')
.replace(/[^a-zA-Z0-9\-]/g, '-');
}
@@ -66,6 +66,12 @@ export class AwsEKSClusterProcessor implements CatalogProcessor {
// location target is of format "account-id/region"
const [accountId, region] = location.target.split('/');
if (!accountId || !region) {
throw new Error(
'AWS EKS location specified without account or region information',
);
}
let credentials: Credentials | undefined;
if (this.credentialsFactory) {