In HaveIBeenPwnedClient.GetAuthenticatedAsync<T>(Uri, CancellationToken) we throw an InvalidOperationException when no API key is supplied via the HaveIBeenPwnedClientSettings:
However, in #28 we introduced the InvalidApiKeyException and that's thrown when the supplied API key is invalid or expired. We should also throw this when no API key is is supplied via the settings.
In
HaveIBeenPwnedClient.GetAuthenticatedAsync<T>(Uri, CancellationToken)
we throw anInvalidOperationException
when no API key is supplied via theHaveIBeenPwnedClientSettings
:https://github.com/akamsteeg/AtleX.HaveIBeenPwned/blob/20215cc1c9904dd113973182f65cfaa55fc02df8/src/AtleX.HaveIBeenPwned/HaveIBeenPwnedClient.cs#L465
However, in #28 we introduced the
InvalidApiKeyException
and that's thrown when the supplied API key is invalid or expired. We should also throw this when no API key is is supplied via the settings.