You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error helpers in errors.ts (isAPIError, isErrorRetryable, APIErrorCodes) are not exported from the package entry point #1848
src/errors.ts exports APIErrorCodes (with per-code retryable flags), isAPIError, isErrorRetryable, and isConnectionIDError, but src/index.ts never re-exports the module, so none of them are importable from stream-chat (verified on 9.51.0 and current master).
Meanwhile ErrorFromResponse from the same module is publicly reachable, and dist/types/errors.d.ts ships in the package — so TS tooling happily autocompletes the helpers, and the failure only surfaces at build time:
Error: Export isAPIError doesn't exist in target module
The export isAPIError was not found in module [project]/node_modules/stream-chat/dist/esm/index.mjs [app-client] (ecmascript).
All exports of the module are statically known (It doesn't have dynamic exports).
(Turbopack / Next.js 16, statically analyzed ESM. Runtimes with looser CJS interop resolve the import to undefined instead, which is arguably worse since it fails silently.)
Use case: implementing an app-level send-retry policy that fails fast on non-retryable API errors (validation, message-too-long, permissions) while retrying retryable ones (rate limit, timeout). The SDK already encodes exactly this knowledge in APIErrorCodes, but integrators currently have to copy the table into app code to use it.
Would you accept adding export * from './errors' (or a curated subset) to src/index.ts?
Activity
oliverlaz commentedon Sep 7, 2026
hi @andres-dejesus, thanks for raising this issue. Let us take a look at it and we'll get back to you.
fix(errors): correct the API error code table and export the helpers