Coverage for fastid / oauth / exceptions.py: 100%
20 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-10-18 16:37 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-10-18 16:37 +0000
1from starlette import status
3from fastid.api.exceptions import ClientError
6class OAuthProviderNotFoundError(ClientError):
7 message = "OAuth provider not found"
8 error_code = "oauth_provider_not_found"
9 status_code = status.HTTP_400_BAD_REQUEST
12class OAuthProviderDisabledError(ClientError):
13 message = "OAuth provider disabled"
14 error_code = "oauth_provider_disabled"
15 status_code = status.HTTP_400_BAD_REQUEST
18class OAuthAccountNotFoundError(ClientError):
19 message = "OAuth account with this id not found"
20 error_code = "oauth_account_not_found"
21 status_code = status.HTTP_400_BAD_REQUEST
24class OAuthAccountInUseError(ClientError):
25 message = "OAuth account is in use"
26 error_code = "oauth_account_in_use"
27 status_code = status.HTTP_400_BAD_REQUEST
30class ProviderNotAllowedError(ClientError):
31 message = "This OAuth provider is not allowed"
32 error_code = "provider_not_allowed"
33 status_code = status.HTTP_400_BAD_REQUEST