Skip to content

Commit 1cb977d

Browse files
authored
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
1 parent 693f195 commit 1cb977d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

google/cloud/storage/notification.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def create(self, client=None, timeout=_DEFAULT_TIMEOUT, retry=None):
255255
"""
256256
if self.notification_id is not None:
257257
raise ValueError(
258-
f"Notification already exists w/ id: {self.notification_id}"
258+
f"notification_id already set to {self.notification_id}; must be None to create a Notification."
259259
)
260260

261261
client = self._require_client(client)

0 commit comments

Comments
 (0)