Better handle internal failures of API requests