Reserve error codes 90009 and 91008 for SDK silent-failure surfacing#345
Open
umair-ably wants to merge 1 commit into
Open
Reserve error codes 90009 and 91008 for SDK silent-failure surfacing#345umair-ably wants to merge 1 commit into
umair-ably wants to merge 1 commit into
Conversation
ably-js #2236 (DX-1211) surfaces two previously-silent SDK failures as hinted ErrorInfos and needs client-side error codes for them. It first used 93002 (presence.get without presence_subscribe) and 93003 (channel.subscribe without subscribe). 93002 collides with the existing server code "this operation can only be performed on a channel in a namespace with Mutable Messages enabled" (faqs.ably.com/error-code-93002), and 93xxx is the annotations / mutable-messages block. Move each to its subsystem block and reserve here so they are unique platform-wide, mirroring how 93001 is already registered for the annotation mode-check: - 90009 (channel block): channel.subscribe() on a channel attached without the subscribe mode. - 91008 (presence block): presence.get() on a channel attached without the presence_subscribe mode. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
umair-ably
added a commit
to ably/ably-js
that referenced
this pull request
Jun 22, 2026
… off colliding 93002 Two fixes to the presence.get()/channel.subscribe() missing-mode errors: - Hint correctness (review feedback): the presence hint named a "presence-subscribe" capability that does not exist. Presence delivery is governed by the "subscribe" capability, matching the subscribe-mode hint. - Error-code collision: 93002 is the canonical server code for "namespace needs Mutable Messages" (ably-common errors.json, faqs.ably.com/error-code-93002). presence.get() reused it client-side. Move presence to 91008 (presence block, next to 91005) and channel.subscribe() to 90009 (channel block); 93xxx is the annotations/mutable-messages block. Both codes are new on this unreleased branch, so the renumber is non-breaking. Reserved in ably/ably-common#345. Update the two tests asserting them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
umair-ably
added a commit
to ably/ably-js
that referenced
this pull request
Jun 25, 2026
… off colliding 93002 Two fixes to the presence.get()/channel.subscribe() missing-mode errors: - Hint correctness (review feedback): the presence hint named a "presence-subscribe" capability that does not exist. Presence delivery is governed by the "subscribe" capability, matching the subscribe-mode hint. - Error-code collision: 93002 is the canonical server code for "namespace needs Mutable Messages" (ably-common errors.json, faqs.ably.com/error-code-93002). presence.get() reused it client-side. Move presence to 91008 (presence block, next to 91005) and channel.subscribe() to 90009 (channel block); 93xxx is the annotations/mutable-messages block. Both codes are new on this unreleased branch, so the renumber is non-breaking. Reserved in ably/ably-common#345. Update the two tests asserting them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
umair-ably
added a commit
to ably/ably-js
that referenced
this pull request
Jun 25, 2026
… off colliding 93002 Two fixes to the presence.get()/channel.subscribe() missing-mode errors: - Hint correctness (review feedback): the presence hint named a "presence-subscribe" capability that does not exist. Presence delivery is governed by the "subscribe" capability, matching the subscribe-mode hint. - Error-code collision: 93002 is the canonical server code for "namespace needs Mutable Messages" (ably-common errors.json, faqs.ably.com/error-code-93002). presence.get() reused it client-side. Move presence to 91008 (presence block, next to 91005) and channel.subscribe() to 90009 (channel block); 93xxx is the annotations/mutable-messages block. Both codes are new on this unreleased branch, so the renumber is non-breaking. Reserved in ably/ably-common#345. Update the two tests asserting them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ably-js#2236 (DX-1211) surfaces two previously-silent SDK failures as hinted
ErrorInfos and needs client-side error codes for them:presence.get()on a channel attached without thepresence_subscribemode (returns[]today)channel.subscribe()on a channel attached without thesubscribemode (listener never fires today)That PR initially minted
93002(presence) and93003(subscribe).93002collides with the existing server-emitted code — "this operation can only be performed on a channel in a namespace with Mutable Messages enabled" (documented atfaqs.ably.com/error-code-93002) — and93xxxis the annotations / mutable-messages block.This PR reserves the two codes in their correct subsystem blocks so they are unique platform-wide, mirroring how
93001is already registered for the annotation mode-check.Codes added
9000990xxx)channel.subscribe()without thesubscribemode — messages not delivered to the subscriber9100891xxx)presence.get()without thepresence_subscribemode — members not delivered to the clienterrorsHelp.jsonFAQ links can follow once the pages exist; they are not required for reservation. These are SDK client-side codes (like93001), not server-emitted.Related
modesably-js#2236🤖 Generated with Claude Code