Yes, you're right, @effect needs to send a new action, but I think something is wrong with your application logic.
You should not send the SelectOfficeActions.LOAD_FAIL action in the component or service, but rather the LOAD action, which calls @effect , and the effect, in turn, sends LOAD_COMPLETE or LOAD_FAIL based on the criteria.
Something like an example from github libraries
@Effect() login$ = this.updates$ // Listen for the 'LOGIN' action .whenAction('LOGIN') // Map the payload into JSON to use as the request body .map(update => JSON.stringify(update.action.payload)) .switchMap(payload => this.http.post('/auth', payload) // If successful, dispatch success action with result .map(res => ({ type: 'LOGIN_SUCCESS', payload: res.json() })) // If request fails, dispatch failed action .catch(() => Observable.of({ type: 'LOGIN_FAILED' })); );
source share