Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Surface errors when loading PR details. #1059
Conversation
- Added a new `IHasErrorState` interface for view models - Updated ViewBase to track the `IHasErrorState.ErrorMessage` property and display the error message when non-null - Catch exceptions when loading `PullRequestDetailsViewModel`

When an error occurs loading PR details, currently the spinner just spins forever with no indication of an error. This PR adds a simple error display to the view which can easily be reused by other views.
IHasErrorStateinterface for view modelsIHasErrorState.ErrorMessageproperty and display the error message when non-nullPullRequestDetailsViewModelTo test:
Currently looks like this:
Could probably do with some beautification!
Not addressed in this PR
These are rather more involved and so will be addressed in another PR.
Fixes #1049