You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[2.0 / next] An uninitialized async memo whose re-run throws from a dependency loses the error; Loading reveals an empty hole #4364
Found by the async app generator (packages/web/test/async-gen, branch claude/project-thread-bgafe5), minimized.
const[s,set]=createSignal(0);letrelease;constgate=newPromise(r=>(release=r));render(()=>{constm0=createMemo(()=>{if(s()===2)thrownewError("boom");returns();});constm1=createMemo(()=>{constv=m0()+s();returngate.then(()=>v);});return(<Erroredfallback={e=>`[E ${e()?.message}]`}><Loadingfallback="[L]"><span>{m1()}</span></Loading></Errored>);},el);flush();// [L]set(2);flush();// <span></span> — expected [E boom]release(1);// still <span></span>
The same happens with const v = latest(m0) as m1's only read. With const v = m0() alone, the error reaches <Errored> as expected. So it looks tied to the throw cutting the re-run short before a dependency the previous run had read (or to the throw coming through latest()).
Expected:[E boom] (a fresh render with s = 2 shows it).
Actual on next (1f558e5): the error is dropped, Loading reveals, and the hole shows nothing. This never recovers.
Activity
docs(signals): why catchStatus's cleared path needs no staged-error g…
fix(signals): an error staged on its source keeps <Errored> waiting (#…
ryansolid commentedon Oct 28, 2026
Fixed on
nextby #4387 (2861ab8); it ships in the next RC.Generated by Claude Code
test: pin #4377 (a memo over latest(m) shows m's error as the leaf does)
test: pin #4377 (a memo over latest(m) shows m's error as the leaf do…