Added handling for exceeding API rate limit