Skip to content

Commit

Permalink
avoid false error messages on incremental config (#1034)
Browse files Browse the repository at this point in the history
  • Loading branch information
iakov-aws authored Nov 23, 2024
1 parent 9956464 commit 6706725
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cid/helpers/quicksight/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,12 +1272,11 @@ def ensure_dataset_refresh_schedule(self, dataset_id, schedules: list):
DataSetRefreshProperties={'RefreshConfiguration': refresh_configuration}
)
logger.debug(f'Refresh schedule configuration with id {schedule["ScheduleId"]} for dataset {dataset_id} is updated.')
except self.client.exceptions.ResourceNotFoundException:
logger.error(f'Unable to update refresh schedule configuration with id {schedule["ScheduleId"]}. Dataset {dataset_id} does not exist.')
except self.client.exceptions.AccessDeniedException:
logger.error(f'Unable to update refresh schedule configuration with id {schedule["ScheduleId"]}. Please add quicksight:UpdateDataSet permission.')
except Exception as exc:
logger.error(f'Unable to update refresh schedule configuration with id {schedule["ScheduleId"]} for dataset "{dataset_id}": {str(exc)}')
except self.client.exceptions.ClientError as exc:
if 'configuration provided is same as the existing configuration for the dataset.' in str(exc):
logger.debug('RefreshConfiguration already set')
else:
logger.error(f'Unable to update refresh schedule configuration with id {schedule["ScheduleId"]} for dataset "{dataset_id}": {str(exc)}')

# Verify that all schedule parameters are set
schedule["ScheduleId"] = schedule.get("ScheduleId", "cid")
Expand Down

0 comments on commit 6706725

Please sign in to comment.