Skip to content

Add error code 40025 for APIs that are no longer supported#340

Merged
umair-ably merged 1 commit into
mainfrom
add-error-40025-api-no-longer-supported
May 27, 2026
Merged

Add error code 40025 for APIs that are no longer supported#340
umair-ably merged 1 commit into
mainfrom
add-error-40025-api-no-longer-supported

Conversation

@umair-ably
Copy link
Copy Markdown
Contributor

Summary

  • Adds a new generic error code 40025: "API no longer supported" to protocol/errors.json, placed alongside the existing version/compatibility codes (40021, 40023, 40024).

Why

Requested in ably-js#2226 review feedback. That PR re-introduces the deleted v1 callback-style APIs in a deprecated form, throwing synchronously to nudge LLMs/users toward the v2 promise-based APIs. It currently raises ErrorInfo with code 40000 ("bad request"), which is generic and overused.

A dedicated code:

  • Gives LLMs a unique signal to disambiguate this class of error.
  • Sets precedent for future deprecation/removals, rather than continuing to overload 40000.

The wording is intentionally generic ("API no longer supported") so future deprecations can reuse it.

Test plan

  • No code change beyond the JSON entry; CI lint/schema checks should pass.
  • Downstream consumer (ably-js PR #2226) updates to reference 40025.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@umair-ably umair-ably requested a review from AndyTWF May 27, 2026 08:57
@umair-ably umair-ably merged commit 4a7186b into main May 27, 2026
2 checks passed
@umair-ably umair-ably deleted the add-error-40025-api-no-longer-supported branch May 27, 2026 09:00
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.

2 participants