Add some error handling if we can't connect to the API