Skip to content

fix(signals): propagate async setter errors - #3262

Open
GabbeV wants to merge 1 commit into
solidjs:nextfrom
GabbeV:fix/async-setter-error-propagation
Open

fix(signals): propagate async setter errors#3262
GabbeV wants to merge 1 commit into
solidjs:nextfrom
GabbeV:fix/async-setter-error-propagation

Conversation

@GabbeV

@GabbeV GabbeV commented Sep 3, 2026

Copy link
Copy Markdown

Summary

Errors thrown by a custom setter while applying an asynchronous computed result currently escape from the promise fulfillment callback. For store projections this can happen when reconciliation invokes a user-provided key selector: the application gets an unhandled rejection and the projection does not enter its error state.

This routes those errors through the existing async handleError path, matching rejected computations and the existing handling for errors from async comparators.

The regression test uses an ordinary seeded projection whose key selector throws during asynchronous reconciliation, so this fix is independent of the seedless-store proposal.

Testing

  • pnpm exec vitest run tests/store/createProjection.async.test.ts --reporter=dot (32 tests)
  • pnpm types in packages/signals

@changeset-bot

changeset-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f631c04

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@solidjs/signals Patch
test-integration Patch
@solidjs/web Patch
@solidjs/babel-plugin Patch
@solidjs/compiler Patch
@solidjs/diagnostics Patch
@solidjs/element Patch
@solidjs/h Patch
@solidjs/html Patch
solid-js Patch
@solidjs/universal Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codspeed-hq

codspeed-hq Bot commented Sep 3, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 136 untouched benchmarks


Comparing GabbeV:fix/async-setter-error-propagation (f631c04) with next (439a2fe)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant