function refreshToken (response) {
  if (response.data.header) {
    axios.defaults.headers.common['Authorization'] = `Bearer ${response.data.header.token}`
    localStorage.setItem('token', response.data.header.token)
  }
  return response
}
Checks if a network request came back fine, and throws an error if not

@param  {object} response   A response from a network request

@return {object|undefined} Returns either the response, or throws an error