score:2

Accepted answer

based on this tutorial i think that timeout has to be directly below frompromise:

const fetchingepic = (action$, store) =>
  action$
    .oftype('fetch_data')
    .mergemap(() =>
      frompromise(
        axios.post(`/url`, payload)
      )
        .timeout(5000)
        .map(response => ({
          type: 'fetch_data_success',
          data: response.data
        }))
        .catch(error =>
          observable.of({
            type: 'fetch_data_error',
            error
          })
        )
    );

Related Query

More Query from same tag