I think I'd like to see if we can expose the failure a bit better. Currently, there isn't an easy way (without parsing the exception string) to know whether it is an invalid key or some actual failure occurred. We could either:
- Return a boolean to indicate good/bad key, and the exception means an error or failure not related to the validity of the key.
- Throw a more specific exception to let the caller have more easy access to the status code or failure mode.