added API key and limit error handling