Skip to content

Commit 2eae47d

Browse files
committed
Document all publish exceptions
1 parent 05cf8ed commit 2eae47d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pusher_push_notifications/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,18 @@ def publish(self, interests, publish_body):
8787
(see https://docs.pusher.com/push-notifications)
8888
8989
Raises:
90+
PusherAuthError: if the secret_key is incorrect
91+
PusherMissingInstanceError: if the instance_id is incorrect
92+
PusherServerError: if the Push Notifications service returns
93+
an error
94+
PusherValidationError: if the publish_body is invalid
9095
TypeError: if interests is not a list
9196
TypeError: if publish_body is not a dict
97+
TypeError: if any interest is not a string
98+
ValueError: if len(interests) < 1
99+
ValueError: if any interest length is greater than the max
100+
ValueError: if any interest contains a forbidden character
101+
92102
"""
93103
if not isinstance(interests, list):
94104
raise TypeError('interests must be a list')

0 commit comments

Comments
 (0)