Skip to content

Commit

Permalink
update docstring on raised errors from parse_response
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Priebe committed Aug 27, 2024
1 parent e5acb1a commit c6e9821
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions pyfcm/baseapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ def parse_response(self, response):
FCMServerError: FCM is temporary not available
AuthenticationError: error authenticating the sender account
InvalidDataError: data passed to FCM was incorrecly structured
FCMSenderIdMismatchError: the authenticated sender is different from the sender registered to the token
FCMNotRegisteredError: device token is missing, not registered, or invalid
"""

if response.status_code == 200:
Expand Down
9 changes: 5 additions & 4 deletions pyfcm/fcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ def notify(
dict: name (str) - The identifier of the message sent, in the format of projects/*/messages/{message_id}
Raises:
AuthenticationError: If api_key is not set or provided or there is an error authenticating the sender.
FCMServerError: Internal server error or timeout error on Firebase cloud messaging server
InvalidDataError: Invalid data provided
InternalPackageError: Mostly from changes in the response of FCM, contact the project owner to resolve the issue
FCMServerError: FCM is temporary not available
AuthenticationError: error authenticating the sender account
InvalidDataError: data passed to FCM was incorrecly structured
FCMSenderIdMismatchError: the authenticated sender is different from the sender registered to the token
FCMNotRegisteredError: device token is missing, not registered, or invalid
"""
payload = self.parse_payload(
fcm_token=fcm_token,
Expand Down

0 comments on commit c6e9821

Please sign in to comment.