diff --git a/gestion/secrets_new.py b/gestion/secrets_new.py index 3f0c2a70..c5dae00b 100644 --- a/gestion/secrets_new.py +++ b/gestion/secrets_new.py @@ -108,8 +108,9 @@ def get(name): except SecretNotFound as exc: notfound_error = notfound_error or exc except SecretForbidden: - logger.critical('...and that failed (Forbidden).') - raise + if not os.getenv('DBG_SECRETS'): + logger.critical('...and that failed (Forbidden).') + raise logger.critical('...and that failed (not found).') raise notfound_error