Skip to content

fix: SafeReadSide swallows all errors silently#1

Open
AmSach wants to merge 1 commit into
masterfrom
fix/safereadside-swallows-errors
Open

fix: SafeReadSide swallows all errors silently#1
AmSach wants to merge 1 commit into
masterfrom
fix/safereadside-swallows-errors

Conversation

@AmSach
Copy link
Copy Markdown
Owner

@AmSach AmSach commented May 15, 2026

Fixed the bug described in issue geevensingh#27.

What was wrong

SafeReadSide caught all exceptions silently and returned string.Empty, so users saw an empty pane or misleading 'all lines added/removed' diff with no error indication. Critically, the existing fault-handler in LoadAsync (which surfaces Failed to read blobs: ... via ApplyResult) was unreachable for read failures.

How I fixed it

Replaced the SafeReadSide calls with direct _repository.ReadSide() calls inside the Task.Run. Now any exception from reading the blob propagates into the task's IsFaulted state, and the existing ContinueWith handler catches it and shows a clear user-facing error message. Option A from the issue.

Changes

  • DiffViewer/ViewModels/DiffPaneViewModel.cs: 2 lines changed (removed SafeReadSide wrapper calls, now inlined)

Closes geevensingh#27

…errors

SafeReadSide silently caught all exceptions and returned string.Empty,
preventing the existing IsFaulted handler in LoadAsync from ever
reaching for read failures. Now we call _repository.ReadSide directly;
any exception propagates into t.IsFaulted and ApplyResult shows a
user-facing 'Failed to read blobs: ...' message instead of a silent
empty pane or misleading 'all lines added/removed' diff.
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.

DiffViewer: SafeReadSide swallows all errors silently

1 participant