From 50a5f21d98114e97ba26edf2ed121fb6b58e079a Mon Sep 17 00:00:00 2001 From: umair Date: Wed, 27 May 2026 16:23:01 +0100 Subject: [PATCH] docs: add error code 40025 for unsupported SDK API Documents the new 40025 error code introduced in ably/ably-js#2226, thrown when an SDK method is called using an API shape that is no longer supported (e.g. v1 Node-style callbacks on v2 ably-js). Co-Authored-By: Claude Opus 4.7 (1M context) --- src/pages/docs/platform/errors/codes.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pages/docs/platform/errors/codes.mdx b/src/pages/docs/platform/errors/codes.mdx index 558f6e095c..af56f22b37 100644 --- a/src/pages/docs/platform/errors/codes.mdx +++ b/src/pages/docs/platform/errors/codes.mdx @@ -154,6 +154,14 @@ Examples of this error include attempting to use [channel objects](/docs/liveobj Resolution: The following steps can help resolve this issue: * Upgrade the Ably SDK to a version that supports the requested operation. +## 40025: Unsupported SDK API + +This error occurs when an SDK method is called using an API shape that is no longer supported. + +An example of this error is calling an ably-js v2 method using the v1 Node-style callback signature. The v2 SDK is Promise-based and no longer accepts a trailing callback argument. See the [ably-js v2 migration guide](https://github.com/ably/ably-js/blob/main/docs/migration-guides/v2/lib.md) for details on migrating from v1 callbacks to Promises. + +Resolution: Update the call site to use the supported API for your SDK and version. + ## 40030: Invalid publish request (unspecified) This error occurs when a [publish request](/docs/pub-sub#publish) is malformed.