File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
dns-policy-operator/lib/charms/data_platform_libs/v0 Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -453,7 +453,7 @@ def _on_subject_requested(self, event: SubjectRequestedEvent):
453453
454454# Increment this PATCH version before using `charmcraft publish-lib` or reset
455455# to 0 if you are raising the major API version
456- LIBPATCH = 56
456+ LIBPATCH = 57
457457
458458PYDEPS = ["ops>=2.0.0" ]
459459
@@ -842,6 +842,11 @@ def _legacy_compat_find_secret_by_old_label(self) -> None:
842842 self ._secret_meta = self ._model .get_secret (label = label )
843843 except SecretNotFoundError :
844844 pass
845+ except ModelError as e :
846+ # Permission denied can be raised if the secret exists but is not yet granted to us.
847+ if "permission denied" in str (e ):
848+ return
849+ raise
845850 else :
846851 if label != self .label :
847852 self .current_label = label
@@ -876,6 +881,8 @@ def _legacy_migration_to_new_label_if_needed(self) -> None:
876881 except ModelError as err :
877882 if MODEL_ERRORS ["not_leader" ] not in str (err ):
878883 raise
884+ if "permission denied" not in str (err ):
885+ raise
879886 self .current_label = None
880887
881888 ##########################################################################
You can’t perform that action at this time.
0 commit comments