Skip to content

Signin  >  Errors  >  AccessDeniedException

AccessDeniedException

Error Class

AccessDeniedException dataclass

Bases: ServiceError

Error thrown for access denied scenarios with flexible HTTP status mapping Runtime HTTP Status Code Mapping: - HTTP 401 (Unauthorized): TOKEN_EXPIRED, AUTHCODE_EXPIRED - HTTP 403 (Forbidden): USER_CREDENTIALS_CHANGED, INSUFFICIENT_PERMISSIONS The specific HTTP status code is determined at runtime based on the error enum value. Consumers should use the error field to determine the specific access denial reason.

Attributes

error instance-attribute
error: str

OAuth 2.0 error code indicating the specific type of access denial Can be TOKEN_EXPIRED, AUTHCODE_EXPIRED, USER_CREDENTIALS_CHANGED, or INSUFFICIENT_PERMISSIONS

fault class-attribute instance-attribute
fault: Literal['client', 'server'] | None = 'client'