add error handling when the API key is wrong