I write ngrx effect with httpRequest which use action.payload of Action.
From request I get data which I use in map operator (if error occur i handle it in catchError)
From Backend I get only boolean value, How I can propagate action.payload from Action to map or catchError operator?
Example:
effect= this.actions$
.ofType(Actions.IS_OK)
.pipe(
mergeMap(action => this.service.isOk(action.payload),
map((isOk: boolean) => new SuccessAction(isOk, action.payload), //here I need somehow get to action.payload value
catchError(error => of(new ErrorAction(error, action.payload))) //here I need somehow get to action.payload value
);
And I can not store payload to store, because I have triggered more actions: Actions.IS_OK
Thanks for help