title: Why does Promises.all doesn't work in my vuex store
body: <p>I'm facing a weird issue right now. I have a vuex store in my vue project which is seperated in different modules. I want to use <code>Promise.all()</code> to execute two independent async vuex action at once to enjoy the advantage of the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all#Promise.all_fail-fast_behaviour" rel="nofollow noreferrer">first fail behavior</a>.</p>
  
  <p><strong>store/modules/categories:</strong></p>
  
  <pre><code>    async CATEGORIES({ rootState }) {
          const response = await axios.post('link_to_api', {
              // some arguments for the api
              arg: rootState.args
          })
  
          return response
      }
  </code></pre>
  
  <p><strong>store/modules/transportation:</strong></p>
  
  <pre><code>    async TRANSPORTATION({ rootState }) {
           const response = await axios.post('link_to_api', {
              // some arguments for the api
              arg: rootState.args
          })
  
          return response
      }
  </code></pre>
  
  <p>I know want to call those async functions in <code>Promise.all</code>:</p>
  
  <p><strong>store/modules/categories:</strong></p>
  
  <pre><code>    async PUT_CATEGORIES({ commit, dispatch, rootState }) {
        try {
           const [resCategories, resTransportation] = await Promise.all([
              dispatch('CATEGORIES').catch(err =&gt; { console.log('Fehler bei Kabinenabfrage!'); throw {error: err, origin: 'kabine'}; }),
              dispatch('transportation/TRANSPORTATION', {root:true}).catch(err =&gt; { console.log('Fehler bei Flugabfrage!'); throw {error: err, origin: 'flug'}; })
          ]) 
           //do something after both promises resolved
  
        } catch(error) {
              // do something if one promise rejected
              commit('errorlog/ERROR', 4, {root:true})
              dispatch("errorlog/LOG_ERROR", {'origin': '2', 'error_code': '113', 'message': error.toString()}, {root:true})
              router.push({path: '/Error'})
          }  
  </code></pre>
  
  <p>I get the following error:</p>
  
  <p><a href="https://i.stack.imgur.com/2ysmx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2ysmx.png" alt="error message"></a></p>
  
  <p>This is weird because I used <code>{root:true}</code> and the prefix <em>transport</em> in dispatch to access the action of the transport module in store. This works great for the <em>LOG_ERROR</em> action in the <em>errorlog</em> module I use in the catch block. </p>
  
  <p>If I copy the <em>TRANSPORTATION</em> action in the categories module it works great...</p>
  
  <p>Has anybody faced this issue before and has an advice??</p>
  
  <p>Thanks in advance!</p>