Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Allow "throwing" in server streams

Aperta
#333 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

  • #335 di @Monkatraz — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript

Direzione di ricerca

Start by tracing how the server stream handler represents the protocol's UNCAUGHT_ERROR and how errors thrown outside the main handler currently behave. Define the ctx.uncaught entry point so a callback or background task can end the request with the same semantics as throwing inside the handler, then verify streaming requests receive the expected internal error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

UNCAUGHT_ERROR is built into the protocol, it means the server encountered an internal error in processing the request.

We've noticed that people use this correctly when using unary rpcs but not all the time in streaming rpcs. The reason being is that if you're outside the main handler function (i.e. in a callback or background task), you have no way of triggering an internal error, throwing will not be caught by the handler.

This leads people to define error types that are basically unhandlable by the client and are effectively custom internal errors. This leads to bad error hygiene on the client side.

We should have a way to basically end the request with an uncaught, something like ctx.uncaught(new Error("something went wrong")), which would end the request following similar semantics as throwing within the handler.

Lingua principale
TypeScript
Stelle
100
Fork
10
Merge medio
1h 24m
PR unite (30g)
2

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di replit/river

Tutte le issue di replit/river

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.