Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions etc/firebase-admin.messaging.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ export const MessagingErrorCode: {
readonly INVALID_PACKAGE_NAME: "invalid-package-name";
readonly DEVICE_MESSAGE_RATE_EXCEEDED: "device-message-rate-exceeded";
readonly TOPICS_MESSAGE_RATE_EXCEEDED: "topics-message-rate-exceeded";
readonly TOPICS_SUBSCRIPTION_RATE_EXCEEDED: "topics-subscription-rate-exceeded";
readonly MESSAGE_RATE_EXCEEDED: "message-rate-exceeded";
readonly THIRD_PARTY_AUTH_ERROR: "third-party-auth-error";
readonly TOO_MANY_TOPICS: "too-many-topics";
Expand Down
9 changes: 8 additions & 1 deletion src/messaging/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const MessagingErrorCode = {
INVALID_PACKAGE_NAME: 'invalid-package-name',
DEVICE_MESSAGE_RATE_EXCEEDED: 'device-message-rate-exceeded',
TOPICS_MESSAGE_RATE_EXCEEDED: 'topics-message-rate-exceeded',
TOPICS_SUBSCRIPTION_RATE_EXCEEDED: 'topics-subscription-rate-exceeded',
MESSAGE_RATE_EXCEEDED: 'message-rate-exceeded',
THIRD_PARTY_AUTH_ERROR: 'third-party-auth-error',
TOO_MANY_TOPICS: 'too-many-topics',
Expand Down Expand Up @@ -112,6 +113,12 @@ export const messagingClientErrorCode: { readonly [K in keyof typeof MessagingEr
'high. Reduce the number of messages sent for this topic, and do not immediately retry sending ' +
'to this topic.',
},
TOPICS_SUBSCRIPTION_RATE_EXCEEDED: {
code: MessagingErrorCode.TOPICS_SUBSCRIPTION_RATE_EXCEEDED,
message: 'The rate of subscription management requests to a particular topic is too ' +
'high. Reduce the number of requests sent for this topic, and do not immediately retry the ' +
'request.',
},
Comment thread
jonathanedey marked this conversation as resolved.
MESSAGE_RATE_EXCEEDED: {
code: MessagingErrorCode.MESSAGE_RATE_EXCEEDED,
message: 'Sending limit exceeded for the message target.',
Expand Down Expand Up @@ -207,7 +214,7 @@ const TOPIC_MGT_SERVER_TO_CLIENT_CODE: Record<string, keyof typeof MessagingErro
NOT_FOUND: 'REGISTRATION_TOKEN_NOT_REGISTERED',
INVALID_ARGUMENT: 'INVALID_REGISTRATION_TOKEN',
TOO_MANY_TOPICS: 'TOO_MANY_TOPICS',
RESOURCE_EXHAUSTED: 'TOO_MANY_TOPICS',
RESOURCE_EXHAUSTED: 'TOPICS_SUBSCRIPTION_RATE_EXCEEDED',
PERMISSION_DENIED: 'AUTHENTICATION_ERROR',
DEADLINE_EXCEEDED: 'SERVER_UNAVAILABLE',
INTERNAL: 'INTERNAL_ERROR',
Expand Down
Loading