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

@@ -25,8 +25,7 @@ export function fetchSources(
dispatch(fetchSourcesSuccess(repository, revision, path, sources));
})
.catch(err => {
const error = new Error(`failed to fetch sources: ${err.message}`);
dispatch(fetchSourcesFailure(repository, revision, path, error));
dispatch(fetchSourcesFailure(repository, revision, path, err));
});
};
}