Skip to content

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

Open
jonathanedey wants to merge 4 commits into
error-revampfrom
je-fcm-sub
Open

fix(fcm): Map topic subscription RESOURCE_EXHAUSTED server code to new TOPICS_SUBSCRIPTION_RATE_EXCEEDED SDK error code#3148
jonathanedey wants to merge 4 commits into
error-revampfrom
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.

DO_NOT_MERGE: This PR should be merged into the v14 release branch directly. Temporally staging against error-revamp until those changes are merged into v14 separately.

@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
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.

2 participants