I am using redux-observable in my angular project. I have an updateNode
function in my epics with catchError
handling. I dispatch action DB_UPDATE_NODE
many times and everything work well. However the time action execute catchError
when I dispatch that action again, updateNode
function wont be called any more.
public updateNode(action$: Observable<IScenarioNodesAction>, store: Store<IAppState>) {
return action$.pipe(
ofType(ScenarioNodeActionType.DB_UPDATE_NODE),
flatMap((action) => {
return this._scenarioNodeService.update(action.payload.botId);
}),
flatMap(data => [
this._scenarioNodeAction.updateNode(data),
]),
catchError((error) => {
return Observable.of(this._commonAction.showError(error));
})
);
}