diff --git a/src/journal-processors.ts b/src/journal-processors.ts index 0aa6ce1..79e2dd4 100644 --- a/src/journal-processors.ts +++ b/src/journal-processors.ts @@ -5,7 +5,7 @@ import { List } from 'immutable'; import { EventType, ContactType, TaskType } from './pim-types'; import { store } from './store'; -import { addError } from './store/actions'; +import { appendError } from './store/actions'; import * as EteSync from 'etesync'; @@ -20,7 +20,7 @@ export function syncEntriesToItemMap( comp = ContactType.parse(syncEntry.content); } catch (e) { e.message = `${e.message}\nWhile processing: ${syncEntry.content}`; - store.dispatch(addError(undefined as any, e)); + store.dispatch(appendError(undefined as any, e)); return; } @@ -94,7 +94,7 @@ function syncEntriesToCalendarItemMap( comp = ItemType.parse(syncEntry.content); } catch (e) { e.message = `${e.message}\nWhile processing: ${syncEntry.content}`; - store.dispatch(addError(undefined as any, e)); + store.dispatch(appendError(undefined as any, e)); return; } diff --git a/src/store/actions.ts b/src/store/actions.ts index 0730ec0..9a3da44 100644 --- a/src/store/actions.ts +++ b/src/store/actions.ts @@ -196,8 +196,8 @@ export function fetchAll(etesync: CredentialsData, currentEntries: EntriesData) } -export const addError = createAction( - 'ADD_ERRORS', +export const appendError = createAction( + 'APPEND_ERROR', (_etesync: CredentialsData, error: Error) => { return error; } diff --git a/src/store/reducers.ts b/src/store/reducers.ts index 295ad99..da1acf1 100644 --- a/src/store/reducers.ts +++ b/src/store/reducers.ts @@ -258,7 +258,7 @@ export const errorsReducer = handleActions( return state; }, - [actions.addError.toString()]: (state: List, action: Action) => { + [actions.appendError.toString()]: (state: List, action: Action) => { return state.push(action.payload); }, [actions.clearErros.toString()]: (state: List, _action: Action) => {