diff --git a/shelvery/rds_cluster_backup.py b/shelvery/rds_cluster_backup.py index 8a02779..65e7b3d 100644 --- a/shelvery/rds_cluster_backup.py +++ b/shelvery/rds_cluster_backup.py @@ -117,13 +117,13 @@ def copy_backup_to_region(self, backup_id: str, region: str) -> str: ) return backup_id - def snapshot_exists(client, backup_id): + def snapshot_exists(self, client, backup_id): try: response = client.describe_db_cluster_snapshots(DBClusterSnapshotIdentifier=backup_id) snapshots = response.get('DBClusterSnapshots', []) return bool(snapshots) except ClientError as e: - if e.response['Error']['Code'] == 'DBClusterSnapshotNotFound': + if e.response['Error']['Code'] == 'DBClusterSnapshotNotFound' or e.response['Error']['Code'] == 'DBClusterSnapshotNotFoundFault': return False else: print(e.response['Error']['Code'])