From dec025b45ac13325611299296b4836faf3fcb822 Mon Sep 17 00:00:00 2001 From: Evgenii Alekseev Date: Thu, 19 Feb 2026 02:04:35 +0200 Subject: [PATCH] feat: raise OptionError on missing OAuth provider class instead of generic AttributeError --- src/ahriman/core/auth/oauth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ahriman/core/auth/oauth.py b/src/ahriman/core/auth/oauth.py index 288027d9..49313ea7 100644 --- a/src/ahriman/core/auth/oauth.py +++ b/src/ahriman/core/auth/oauth.py @@ -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?