Raise error if missing an API key
Add error class