Skip to content

docs(useStorage): recipe for surfacing failed writes - #904

Merged
johnleider merged 1 commit into
masterfrom
docs/use-storage-failed-writes
Aug 20, 2026
Merged

docs(useStorage): recipe for surfacing failed writes#904
johnleider merged 1 commit into
masterfrom
docs/use-storage-failed-writes

Conversation

@johnleider

Copy link
Copy Markdown
Member

Writes are fire-and-forget inside a deep watcher, so storage.set cannot reject and an onError factory option would be a new callback family the rest of the plugin layer does not use.

The composition point is the adapter — wrap setItem, record the failure, rethrow so the internal log still fires. Same move as a custom logger or notifications adapter. Theme/locale persist ride the same plugin instance.

Closes #767
Closes #756

Adapter wrap is the composition point — no onError hook.
@johnleider johnleider added this to the v1.0.x milestone Aug 20, 2026
@johnleider johnleider added documentation Improvements or additions to documentation E: useStorage labels Aug 20, 2026
@johnleider johnleider self-assigned this Aug 20, 2026
@johnleider
johnleider merged commit eb27110 into master Aug 20, 2026
22 checks passed
@johnleider
johnleider deleted the docs/use-storage-failed-writes branch August 20, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation E: useStorage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(useStorage): onError hook so consumers can surface failed writes

1 participant