Error helpers in errors.ts (isAPIError, isErrorRetryable, APIErrorCodes) are not exported from the package entry point
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- api
Direzione di ricerca
Inizia da src/index.ts e confronta i suoi export con gli helper già esportati da src/errors.ts. Verifica l’entry point del package e gli output ESM/types generati, quindi esegui i controlli di test o build pertinenti. Il lavoro è completato quando gli helper degli errori documentati e APIErrorCodes possono essere importati da stream-chat senza il fallimento di Turbopack né export silenziosamente undefined.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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?
- Lingua principale
- TypeScript
- Stelle
- 211
- Fork
- 84
- Merge medio
- 1g 2h
- PR unite (30g)
- 89
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GetStream/stream-chat-js
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
GetStream/stream-chat-js#1719 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
GetStream/stream-chat-js#1967 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
GetStream/stream-chat-js#1777 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
GetStream/stream-chat-js#1680 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
GetStream/stream-chat-js#1668 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di GetStream/stream-chat-js
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
siyuan-note/siyuan#21692 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
GetStream/stream-chat-react#3467 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
resend/resend-node#1206 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cloudflare/cloudflare-typescript#2821 ·