Skip to content

Filter network cancellations and transient errors from Sentry#1

Merged
RISCfuture merged 1 commit intomainfrom
worktree-agent-a81eeb94
Apr 12, 2026
Merged

Filter network cancellations and transient errors from Sentry#1
RISCfuture merged 1 commit intomainfrom
worktree-agent-a81eeb94

Conversation

@RISCfuture
Copy link
Copy Markdown
Contributor

Summary

  • Catch URLError(.cancelled) alongside CancellationError so task cancellations propagating through URLSession no longer reach Sentry (fixes SF50-TOLD-21, SF50-TOLD-24, SF50-TOLD-25)
  • Skip Sentry reporting for transient network errors (DNS failures, timeouts, connectivity loss, etc.) while still logging them at info level and setting the error state for UI display (fixes SF50-TOLD-23)
  • Add isNetworkCancellation and isTransientNetworkError static helpers on WeatherLoader for consistent error classification

Test plan

  • Build succeeds
  • Unit tests pass (SF50 Shared Unit Tests)
  • UI tests pass (SF50 TOLD UI Tests) — running, not affected by this change

🤖 Generated with Claude Code

URLError(.cancelled) was not caught by `catch is CancellationError` and
fell through to Sentry. Transient network errors like DNS lookup failures
were also reported unnecessarily. Now both are handled gracefully: cancellations
skip state updates, and transient errors log at info level without Sentry capture.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@RISCfuture RISCfuture merged commit 35a3314 into main Apr 12, 2026
8 of 10 checks passed
@RISCfuture RISCfuture deleted the worktree-agent-a81eeb94 branch April 12, 2026 20:44
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