Skip to content

fix(fcm): Map topic subscription RESOURCE_EXHAUSTED server code to new TOPICS_SUBSCRIPTION_RATE_EXCEEDED SDK error code#3148

Merged
jonathanedey merged 4 commits into
v14from
je-fcm-sub
May 26, 2026
Merged

fix(fcm): Map topic subscription RESOURCE_EXHAUSTED server code to new TOPICS_SUBSCRIPTION_RATE_EXCEEDED SDK error code#3148
jonathanedey merged 4 commits into
v14from
je-fcm-sub

Conversation

@jonathanedey
Copy link
Copy Markdown
Collaborator

@jonathanedey jonathanedey commented May 15, 2026

Previously we incorrectly mapped the topic subscription RESOURCE_EXHAUSTED FCM server code to TOO_MANY_TOPICS SDK error code leading to misleading error messaging for the cause of the error. This PR introduces a new TOPICS_SUBSCRIPTION_RATE_EXCEEDED to correctly attribute the error.

RELEASE_NOTE: Mapped the topic management RESOURCE_EXHAUSTED server error to a new TOPICS_SUBSCRIPTION_RATE_EXCEEDED code instead of TOO_MANY_TOPICS to improve subscription rate limits error messaging.

@jonathanedey jonathanedey added release-note release:stage Stage a release candidate labels May 15, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new error code, TOPICS_SUBSCRIPTION_RATE_EXCEEDED, to handle rate-limiting scenarios in topic management. It updates the server-to-client error mapping so that RESOURCE_EXHAUSTED now correctly maps to this new code instead of TOO_MANY_TOPICS. Feedback was provided to generalize the error message to cover both subscription and unsubscription operations, as the current wording is specific to subscribing.

Comment thread src/messaging/error.ts
Comment thread src/messaging/error.ts Outdated
@jonathanedey jonathanedey changed the base branch from error-revamp to v14 May 26, 2026 18:26
@jonathanedey jonathanedey merged commit 0fdcd16 into v14 May 26, 2026
14 checks passed
@jonathanedey jonathanedey deleted the je-fcm-sub branch May 26, 2026 19:10
lahirumaramba pushed a commit that referenced this pull request May 26, 2026
…new `TOPICS_SUBSCRIPTION_RATE_EXCEEDED` SDK error code (#3148)

* fix(fcm): Map `RESOURCE_EXHAUSTED` server code to new `TOPICS_SUBSCRIPTION_RATE_EXCEEDED` SDK error code

* fix: Update apidocs

* fix: Address gemini review

* fix: Apply TW review changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:stage Stage a release candidate release-note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants