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?
src/errors.tsexportsAPIErrorCodes(with per-coderetryableflags),isAPIError,isErrorRetryable, andisConnectionIDError, butsrc/index.tsnever re-exports the module, so none of them are importable fromstream-chat(verified on 9.51.0 and current master).Meanwhile
ErrorFromResponsefrom the same module is publicly reachable, anddist/types/errors.d.tsships in the package — so TS tooling happily autocompletes the helpers, and the failure only surfaces at build time:(Turbopack / Next.js 16, statically analyzed ESM. Runtimes with looser CJS interop resolve the import to
undefinedinstead, 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) tosrc/index.ts?