bedrock.exceptions.unauthorised_exception

 1from .bedrock_exception import BedrockException
 2
 3
 4class UnauthorisedException(BedrockException):  # pragma: unit
 5    """
 6    Throw this exception when the client is not authorised to access a resource because it has not provided valid credentials.
 7
 8    Default HTTP code: 401.
 9    """
10    def __init__(self, message="Unauthorised", exception=None):
11        super().__init__(message, exception, error_code=401)
class UnauthorisedException(bedrock.exceptions.bedrock_exception.BedrockException):
 5class UnauthorisedException(BedrockException):  # pragma: unit
 6    """
 7    Throw this exception when the client is not authorised to access a resource because it has not provided valid credentials.
 8
 9    Default HTTP code: 401.
10    """
11    def __init__(self, message="Unauthorised", exception=None):
12        super().__init__(message, exception, error_code=401)

Throw this exception when the client is not authorised to access a resource because it has not provided valid credentials.

Default HTTP code: 401.

UnauthorisedException(message='Unauthorised', exception=None)
11    def __init__(self, message="Unauthorised", exception=None):
12        super().__init__(message, exception, error_code=401)