Add error handling for empty secrets in GitLab webhook and lower log level for Google Cloud Storage secret retrieval errors

This commit is contained in:
mrT23
2024-08-13 11:42:07 +03:00
parent cb65b05e85
commit 78b11c80c7
2 changed files with 5 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class GoogleCloudStorageSecretProvider(SecretProvider):
blob = self.bucket.blob(secret_name)
return blob.download_as_string()
except Exception as e:
get_logger().error(f"Failed to get secret {secret_name} from Google Cloud Storage: {e}")
get_logger().warning(f"Failed to get secret {secret_name} from Google Cloud Storage: {e}")
return ""
def store_secret(self, secret_name: str, secret_value: str):