Files

13 lines
370 B
Python
Raw Permalink Normal View History

2025-05-04 15:24:28 +03:30
from django.utils.translation import gettext_lazy as _
from rest_framework.exceptions import APIException
from rest_framework import status
class CaptchaFailed(APIException):
"""
raised exception when user entered wrong captcha code
"""
status_code = status.HTTP_403_FORBIDDEN
default_detail = _('Wrong Captcha')
default_code = 'wrong captcha'