akiomik / akiomik/nosvelte

An operator error discards already-rendered data and cannot be recovered from

Abierto
#84 0 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
TypeScript
Estrellas
29
Forks
3
Merge medio
3 h 5 min
PR fusionados (30 d)
11

Descripción

When an operator in the pipe throws, the RxJS stream terminates permanently and
`useReq()` has no way back:

- the local `error` store is set (`src/lib/stores/useReq.ts:88-97`) and is only ever
cleared at the start of a `queryFn` run (`:50`);
- if the query had already resolved, `queryFn` will not run again on its own;
- the derived `status` prefers the local error over the query's state (`:126`), so
it reports `'error'` indefinitely.

Every component checks `{#if $error}` **before** it looks at `$data`
(`Text.svelte:32`, `EventList.svelte:32`, and the same line in the other nine), so
data that was already rendered is discarded and the component is stuck on the error
slot until something calls `invalidateQueries` by hand.

A stream that fails after delivering 50 events leaves the consumer with an error
slot and no way to show the 50 events it still holds.

Determined by code reading.

## Direction

Whether to discard already-delivered data on error is the consumer's decision, not
the library's. The result shape should be able to represent "errored, and here is
what we had" rather than forcing the two apart.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.