BUG: Better error handling when invalid API keys are entered.