Skip to content

Reserve error codes 90009 and 91008 for SDK silent-failure surfacing#345

Open
umair-ably wants to merge 1 commit into
mainfrom
DX-1211/reserve-error-codes-91008-90009
Open

Reserve error codes 90009 and 91008 for SDK silent-failure surfacing#345
umair-ably wants to merge 1 commit into
mainfrom
DX-1211/reserve-error-codes-91008-90009

Conversation

@umair-ably

Copy link
Copy Markdown
Contributor

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 the presence_subscribe mode (returns [] today)
  • channel.subscribe() on a channel attached without the subscribe mode (listener never fires today)

That PR initially minted 93002 (presence) and 93003 (subscribe). 93002 collides with the existing server-emitted code — "this operation can only be performed on a channel in a namespace with Mutable Messages enabled" (documented at faqs.ably.com/error-code-93002) — and 93xxx is the annotations / mutable-messages block.

This PR reserves the two codes in their correct subsystem blocks so they are unique platform-wide, mirroring how 93001 is already registered for the annotation mode-check.

Codes added

Code Block Meaning
90009 channel (90xxx) channel.subscribe() without the subscribe mode — messages not delivered to the subscriber
91008 presence (91xxx) presence.get() without the presence_subscribe mode — members not delivered to the client

errorsHelp.json FAQ links can follow once the pages exist; they are not required for reservation. These are SDK client-side codes (like 93001), not server-emitted.

Related

🤖 Generated with Claude Code

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 umair-ably marked this pull request as ready for review June 22, 2026 12:44
@umair-ably umair-ably requested a review from AndyTWF June 22, 2026 12:44
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant