Two content problems in the error-code registry, found while writing new docs on removing a user's channel access (token capabilities + revocation). Both fixes belong in this repo: the pages at ably.com/docs/platform/errors/codes/* are generated from errors/codes/*.md here, and hand-edits to the generated pages fail the website's docs-check-error-docs CI job.
1. 40163 and 40164 are indistinguishable
errors/codes/40163.md and errors/codes/40164.md produce identical titles and word-for-word identical descriptions:
40163 / 40164: Token revocation not enabled for API key
The operation was refused because the API key used does not have revocable tokens enabled. Revocation applies only to tokens issued by a key with that setting turned on.
A developer who hits one of these cannot learn from the docs why their case produced 40163 rather than 40164, and the two generated pages (40163, 40164) are near-duplicates of each other.
Ask: either document what actually distinguishes them (which operation or code path raises each), or, if one is vestigial, say so on its page and point at the canonical one.
2. 40160 does not mention deliberate access removal
40160 (operation not permitted with provided capability) is what a client sees when its access to a channel is deliberately removed: the server narrows the capability its token endpoint issues, then revokes the user's tokens; the channel force-detaches into the failed state with 40160 and further attach attempts are refused, while the connection and the client's other channels are unaffected.
A new guide documenting that flow is about to land on the website (/docs/auth/ban-users, branch docs/auth-ban-users-guide in ably/website). The 40160 page would answer the "why am I seeing this?" question better if it listed this cause. Proposed addition to errors/codes/40160.md, appended to the existing "Why it happens" list (registry sources use absolute links):
- A deliberate removal of access, such as banning a user from a channel. Revoking the user's tokens
after narrowing what your token endpoint grants them detaches that channel into the `failed` state
with this error and refuses further attach attempts, while the user's other channels stay attached.
See [ban users](https://ably.com/docs/auth/ban-users).
Sequencing: Note item 2 depends on whether /docs/auth/ban-users lands, which right now is not even a PR.
Simon / Lewis assigned you as I know you have both done work on error codes, but not sure who's best to look at this
Two content problems in the error-code registry, found while writing new docs on removing a user's channel access (token capabilities + revocation). Both fixes belong in this repo: the pages at
ably.com/docs/platform/errors/codes/*are generated fromerrors/codes/*.mdhere, and hand-edits to the generated pages fail the website'sdocs-check-error-docsCI job.1. 40163 and 40164 are indistinguishable
errors/codes/40163.mdanderrors/codes/40164.mdproduce identical titles and word-for-word identical descriptions:A developer who hits one of these cannot learn from the docs why their case produced 40163 rather than 40164, and the two generated pages (40163, 40164) are near-duplicates of each other.
Ask: either document what actually distinguishes them (which operation or code path raises each), or, if one is vestigial, say so on its page and point at the canonical one.
2. 40160 does not mention deliberate access removal
40160 (operation not permitted with provided capability) is what a client sees when its access to a channel is deliberately removed: the server narrows the capability its token endpoint issues, then revokes the user's tokens; the channel force-detaches into the
failedstate with 40160 and further attach attempts are refused, while the connection and the client's other channels are unaffected.A new guide documenting that flow is about to land on the website (
/docs/auth/ban-users, branchdocs/auth-ban-users-guidein ably/website). The 40160 page would answer the "why am I seeing this?" question better if it listed this cause. Proposed addition toerrors/codes/40160.md, appended to the existing "Why it happens" list (registry sources use absolute links):Sequencing: Note item 2 depends on whether
/docs/auth/ban-userslands, which right now is not even a PR.Simon / Lewis assigned you as I know you have both done work on error codes, but not sure who's best to look at this