fix(glue): check if get dev endpoints call is supported (#4193)

This commit is contained in:
Sergio Garcia
2024-06-06 08:43:39 -04:00
committed by GitHub
parent 7b43b3d31e
commit f7b7ce3b95
@@ -1,5 +1,6 @@
from typing import Optional
from botocore.exceptions import ClientError
from pydantic import BaseModel
from prowler.lib.logger import logger
@@ -72,6 +73,18 @@ class Glue(AWSService):
region=regional_client.region,
)
)
except ClientError as error:
# Check if the operation is not supported in the region
if error.response["Error"]["Message"].startswith(
"Operation is not supported"
):
logger.warning(
f"{regional_client.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
)
else:
logger.error(
f"{regional_client.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
)
except Exception as error:
logger.error(
f"{regional_client.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"