diff --git a/lib/context/context.py b/lib/context/context.py index 46d4472..7dd5719 100644 --- a/lib/context/context.py +++ b/lib/context/context.py @@ -267,12 +267,20 @@ def get_account_organizations(self): "OU": organizations_ou, } except ClientError as err: - self.logger.error( - "Failed to describe_account: %s, for resource: %s - %s", - self.resource_account_id, - self.resource_arn, - err, - ) + if err.response["Error"]["Code"] == "AWSOrganizationsNotInUseException": + self.logger.info( + "Failed to describe_account: %s, for resource: %s - %s", + self.resource_account_id, + self.resource_arn, + err, + ) + else: + self.logger.warning( + "Failed to describe_account: %s, for resource: %s - %s", + self.resource_account_id, + self.resource_arn, + err, + ) return organizations