raise an exception if no API key is set