Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit b7e2d0a

Browse files
committed
Backport #653
Prevent AuthorizationException crashing VS in PullRequestListViewModel.
1 parent 5cff6a6 commit b7e2d0a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/GitHub.App/ViewModels/PullRequestListViewModel.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ public override void Initialize([AllowNull] ViewWithData data)
108108

109109
pullRequests.OriginalCompleted
110110
.ObserveOn(RxApp.MainThreadScheduler)
111+
.Catch<System.Reactive.Unit, Octokit.AuthorizationException>(ex =>
112+
{
113+
// TODO: Do some decent logging here
114+
return repositoryHost.LogOut();
115+
})
111116
.Subscribe(_ =>
112117
{
113118
if (listSettings.SelectedAuthor != null)

0 commit comments

Comments
 (0)