Cannot read property 'then' of undefined
<p>So I'm using react + redux, and I'm continuing to get the following error:  "Cannot read property 'then' of undefined". For some reason the promise isn't being returned. I'm also particularly new to using redux thunk. </p>

<p><strong>Reducer</strong></p>

<pre><code>import { merge } from 'lodash';
import  * as APIutil  from '../util/articles_api_util';


import {
  ArticleConstants
} from '../actions/article_actions';

const ArticlesReducer = (state = {}, action) =&gt; {
  switch (action.type) {
    case ArticleConstants.RECEIVE_ALL_ARTICLES:
    debugger
    return merge({}, action.articles);
    default:
      return state;
  }
};

export default ArticlesReducer;
</code></pre>

<p><strong>Store</strong></p>

<pre><code>import { createStore, applyMiddleware } from 'redux';
import RootReducer from '../reducers/root_reducer';
import thunk from 'redux-thunk';

import  * as APIUtil  from '../util/articles_api_util';

export const ArticleConstants = {
    RECEIVE_ALL_ARTICLES: "RECEIVE_ALL_ARTICLES",
    REQUEST_ALL_ARTICLES: "REQUEST_ALL_ARTICLES"
}
</code></pre>

<p><strong>Actions</strong></p>

<pre><code>export function fetchArticles() {
  return function(dispatch) {
    return APIUtil.fetchArticles().then(articles =&gt; {
      dispatch(receiveAllArticles(articles));
    }).catch(error =&gt; {
      throw(error);
    });
  };
}


export const requestAllArticles= () =&gt; ({
    type: REQUEST_ALL_ARTICLES
});


export const receiveAllArticles = articles =&gt; ({
    type: RECEIVE_ALL_ARTICLES,
    articles
});

    const configureStore = (preloadedState = {}) =&gt; (
      createStore(
        RootReducer,
        preloadedState,
        applyMiddleware(thunk)
      )
    );


    export default configureStore;
</code></pre>

<p><strong>APIUtil</strong></p>

<pre><code>export const fetchArticles = (success) =&gt; {
  $.ajax({
        method: 'GET',
        url: `/api/articles`,
        success,
        error: ()=&gt; (
        console.log("Invalid Article")
      )
    });
};
</code></pre>