mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-02-24 21:59:48 +00:00
feat: raise OptionError on missing OAuth provider class instead of generic AttributeError
This commit is contained in:
@@ -86,7 +86,7 @@ class OAuth(Mapping):
|
||||
Raises:
|
||||
OptionError: in case if invalid OAuth provider name supplied
|
||||
"""
|
||||
provider: type[aioauth_client.OAuth2Client] = getattr(aioauth_client, name)
|
||||
provider: type = getattr(aioauth_client, name, type(None))
|
||||
try:
|
||||
is_oauth2_client = issubclass(provider, aioauth_client.OAuth2Client)
|
||||
except TypeError: # what if it is random string?
|
||||
|
||||
Reference in New Issue
Block a user