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

Commit 31a639d

Browse files
committed
Commented changes and added todo.
1 parent 0735fa9 commit 31a639d

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/GitHub.TeamFoundation.14/Connect/GitHubConnectSection.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,13 @@ async void UpdateRepositoryList(object sender, NotifyCollectionChangedEventArgs
222222
var repo = await ApiFactory.Create(newrepo.CloneUrl).GetRepository();
223223
newrepo.SetIcon(repo.Private, repo.Fork);
224224
}
225-
catch { }
225+
catch
226+
{
227+
// GetRepository() may throw if the user doesn't have permissions to access the repo
228+
// (because the repo no longer exists, or because the user has logged in on a different
229+
// profile, or their permissions have changed remotely)
230+
// TODO: Log
231+
}
226232
}
227233
// looks like it's just a refresh with new stuff on the list, update the icons
228234
else
@@ -238,7 +244,14 @@ async void UpdateRepositoryList(object sender, NotifyCollectionChangedEventArgs
238244
{
239245
var repo = await ApiFactory.Create(r.CloneUrl).GetRepository();
240246
r.SetIcon(repo.Private, repo.Fork);
241-
} catch { }
247+
}
248+
catch
249+
{
250+
// GetRepository() may throw if the user doesn't have permissions to access the repo
251+
// (because the repo no longer exists, or because the user has logged in on a different
252+
// profile, or their permissions have changed remotely)
253+
// TODO: Log
254+
}
242255
});
243256
}
244257
}

0 commit comments

Comments
 (0)