Allow "throwing" in server streams
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
- Ambito
- api, backend-api-design
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
- 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 replit/river
-
message payload optimizationApertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Tutte le issue di replit/river
Issue simili
-
area:workflow bug ready-for-human
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
fil-donadoni/tolaria#6108 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/rocketmq-dashboard#7234 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vitest-dev/vitest#11656 ·
I maintainer di solito rispondono entro 1 giorno
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
redhat-developer/rhdh-plugin-export-overlays#4460 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ehmpathy/rhachet-roles-bhrain#655 ·
I maintainer di solito rispondono entro 1 giorno