Coverage for fastid / apps / exceptions.py: 100%
14 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, UnauthorizedError
6class AppNotFoundError(ClientError):
7 message = "App with this client_id not found"
8 error_code = "app_not_found"
9 status_code = status.HTTP_404_NOT_FOUND
12class InvalidRedirectURIError(ClientError):
13 message = "Invalid redirect URI"
14 error_code = "invalid_redirect_uri"
15 status_code = status.HTTP_400_BAD_REQUEST
18class InvalidClientCredentialsError(UnauthorizedError):
19 message = "Invalid client credentials"
20 error_code = "invalid_client_credentials"
23class InvalidAuthorizationCodeError(UnauthorizedError):
24 message = "Invalid code"
25 error_code = "invalid_code"