catch invalid API keys

fixes #6