Handle API call failures