From 1cb977daa2d97c255a382ce81f56a43168b0637d Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Mon, 17 Jun 2024 16:28:04 -0400 Subject: [PATCH] fix: correct notification error message (#1290) To create a new notification, the notification_id field must be set to None. Update the error message to clarify this. Fixes #1289 --- google/cloud/storage/notification.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/cloud/storage/notification.py b/google/cloud/storage/notification.py index 4eb807fa9..9af476d58 100644 --- a/google/cloud/storage/notification.py +++ b/google/cloud/storage/notification.py @@ -255,7 +255,7 @@ def create(self, client=None, timeout=_DEFAULT_TIMEOUT, retry=None): """ if self.notification_id is not None: raise ValueError( - f"Notification already exists w/ id: {self.notification_id}" + f"notification_id already set to {self.notification_id}; must be None to create a Notification." ) client = self._require_client(client)