add check for failed API call