Add console.error to all axios failures
This commit is contained in:
parent
c9a7e6e1e3
commit
564e01eaf6
7 changed files with 19 additions and 0 deletions
|
@ -25,6 +25,7 @@ export function fetchStatus(id) {
|
|||
axios.all([boundApi.get(`/api/v1/statuses/${id}`), boundApi.get(`/api/v1/statuses/${id}/context`)]).then(values => {
|
||||
dispatch(fetchStatusSuccess(values[0].data, values[1].data));
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
dispatch(fetchStatusFail(id, error));
|
||||
});
|
||||
};
|
||||
|
@ -53,6 +54,7 @@ export function deleteStatus(id) {
|
|||
api(getState).delete(`/api/v1/statuses/${id}`).then(response => {
|
||||
dispatch(deleteStatusSuccess(id));
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
dispatch(deleteStatusFail(id, error));
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue