Why are my API requests failing?