do not create new error when error is catched

This commit is contained in:
Maren Süwer
2018-12-12 09:40:37 +01:00
parent 675f417d45
commit 8927d56b5c
6 changed files with 39 additions and 79 deletions

View File

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