Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,8 @@ def _target_is_ou_path(self, resolve_children=False):
ou_id=None,
excluded_paths=[],
)
except ClientError as client_err:
no_target_found = (
client_err.response["Error"]["Code"] == "ParentNotFoundException"
)
if no_target_found and self.adf_deployment_maps_allow_empty_target:
except Exception:
if self.adf_deployment_maps_allow_empty_target:
Comment on lines -278 to +279
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should broaden the except type, as this would imply unrelated exceptions (think network or auth errors) would be hidden if adf_deployment_maps_allow_empty_target is set to true.

Could you please revert this change, then add support for another except that handles the error that it throws?

LOGGER.info(
"Note: Target OU was not found in AWS Org for path %s",
self.path,
Expand Down