Added api key limit reached handling code