improve error handling in the ui

This commit is contained in:
Sebastian Sdorra
2018-11-15 21:39:08 +01:00
parent 51c9a4dbb2
commit a4d78e6e60
13 changed files with 275 additions and 63 deletions

View File

@@ -224,8 +224,7 @@ export function modifyRepo(repository: Repository, callback?: () => void) {
.then(() => {
dispatch(fetchRepoByLink(repository));
})
.catch(cause => {
const error = new Error(`failed to modify repo: ${cause.message}`);
.catch(error => {
dispatch(modifyRepoFailure(repository, error));
});
};