Skip to content

fix: Potential CancellationError swallowing#123

Merged
simolus3 merged 3 commits intomainfrom
cancellation-swallow
Mar 26, 2026
Merged

fix: Potential CancellationError swallowing#123
simolus3 merged 3 commits intomainfrom
cancellation-swallow

Conversation

@stevensJourney
Copy link
Copy Markdown
Contributor

Overview

Some of our SDK methods run certain operations which could throw exceptions. Any potential exceptions are wrapped in a PowerSyncException for better visibility in consumer code.

While investigating a potential watched query cancellation issue. I noticed in the debugger that our Swift Cancellation Errors were wrapped in a .operationError. While our watched queries cancel the consuming task regardless of the error type, we should generally not wrap CancellationErrors.

This rethrows cancellation errors in our wrapPowerSyncException wrapper.

@stevensJourney stevensJourney requested a review from simolus3 March 26, 2026 13:54
@simolus3 simolus3 merged commit c4f8126 into main Mar 26, 2026
3 checks passed
@simolus3 simolus3 deleted the cancellation-swallow branch March 26, 2026 14:45
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.

3 participants