title: Flow Type with Async Await error checking Javascript
body: <p>I can't figure out why this code isn't passing the flow checker. I simply send an object to the updatePopper function and inside it I make an api call to update the data in the DB, and then I get a response, decode that response, and return that new updated data to the client-side and update the redux-form with the latest data. But flow doesn't like my code. Any ideas would be awesome!</p>
  
  <p>This is the error popping up:
  <a href="https://i.stack.imgur.com/l7bwl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l7bwl.png" alt="enter image description here"></a></p>
  
  <p>// Code in my react submit function</p>
  
  <pre><code>const newPopper: {data: Popper} = await this.props.updatePopper(data)
  </code></pre>
  
  <p>// Code in my redux action</p>
  
  <pre><code>export const updatePopper = (data: Popper) =&gt; async (dispatch: DispatchActionDynamic): {data: Popper} =&gt; {
  
    // Make API REQUEST
    const response = await PopperApi.updatePopper(popperData)
  
    // Decode JSON
    const body: PopperResponse = await response.json()
  
    // Check for Valid response and error handling
    await statusCheck(response, dispatch)
  
    // update redux with new data
    dispatch(updatePopper(body))
  
    // return response
    return body
  }
  </code></pre>