Skip to content

Commit

Permalink
fix: correct notification error message (#1290)
Browse files Browse the repository at this point in the history
To create a new notification, the notification_id field must be
set to None. Update the error message to clarify this.

Fixes #1289
  • Loading branch information
tritone authored Jun 17, 2024
1 parent 693f195 commit 1cb977d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google/cloud/storage/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1cb977d

Please sign in to comment.