diff --git a/src/store/reducers.ts b/src/store/reducers.ts index 5eb0c4f..0d0ea42 100644 --- a/src/store/reducers.ts +++ b/src/store/reducers.ts @@ -241,6 +241,20 @@ export const fetchCount = handleAction( export const errorsReducer = handleActions( { + [combineActions( + actions.fetchListJournal, + actions.addJournal, + actions.updateJournal, + actions.deleteJournal, + actions.fetchEntries, + actions.addEntries + ).toString()]: (state: List, action: Action) => { + if (action.error) { + return state.push(action.payload); + } + + return state; + }, [actions.addError.toString()]: (state: List, action: Action) => { return state.push(action.payload); },