Skip to content

Commit 81e032c

Browse files
authored
Updated FCM error codes (#127)
1 parent d81075b commit 81e032c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

firebase_admin/messaging.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -716,12 +716,13 @@ class _MessagingService(object):
716716
INTERNAL_ERROR = 'internal-error'
717717
UNKNOWN_ERROR = 'unknown-error'
718718
FCM_ERROR_CODES = {
719+
'APNS_AUTH_ERROR': 'authentication-error',
720+
'INTERNAL': INTERNAL_ERROR,
719721
'INVALID_ARGUMENT': 'invalid-argument',
720-
'NOT_FOUND': 'registration-token-not-registered',
721-
'PERMISSION_DENIED': 'authentication-error',
722-
'RESOURCE_EXHAUSTED': 'message-rate-exceeded',
723-
'UNAUTHENTICATED': 'authentication-error',
722+
'QUOTA_EXCEEDED': 'message-rate-exceeded',
723+
'SENDER_ID_MISMATCH': 'authentication-error',
724724
'UNAVAILABLE': 'server-unavailable',
725+
'UNREGISTERED': 'registration-token-not-registered',
725726
}
726727
IID_ERROR_CODES = {
727728
400: 'invalid-argument',

0 commit comments

Comments
 (0)