2021-02-24 23:44:06 +00:00
|
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from rest_framework import status
|
|
|
|
|
|
|
|
from common.exceptions import JMSException
|
|
|
|
|
|
|
|
|
|
|
|
class MFANotEnabled(JMSException):
|
|
|
|
status_code = status.HTTP_403_FORBIDDEN
|
|
|
|
default_code = 'mfa_not_enabled'
|
|
|
|
default_detail = _('MFA not enabled')
|
2021-08-24 06:20:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PhoneNotSet(JMSException):
|
|
|
|
default_code = 'phone_not_set'
|
|
|
|
default_detail = _('Phone not set')
|
|
|
|
|
|
|
|
|
|
|
|
class MFAMethodNotSupport(JMSException):
|
|
|
|
default_code = 'mfa_not_support'
|
|
|
|
default_detail = _('MFA method not support')
|