Skip to content

Commit

Permalink
#37 lower logging level on legitimate cases (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
llybin authored Sep 11, 2024
1 parent ef4b8e9 commit 2536f0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drf_recaptcha/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _pre_validate_response(self, check_captcha: "RecaptchaResponse") -> None:
if check_captcha.is_valid:
return

logger.error(
logger.info(
"ReCAPTCHA validation failed due to: %s",
check_captcha.error_codes,
)
Expand Down Expand Up @@ -139,7 +139,7 @@ def _process_response(self, check_captcha_response):
action = check_captcha_response.extra_data.get("action", "")

if self.recaptcha_required_score > float(self.score):
logger.error(
logger.info(
"ReCAPTCHA validation failed due to score of %s"
" being lower than the required amount for action '%s'.",
self.score,
Expand All @@ -151,7 +151,7 @@ def _process_response(self, check_captcha_response):
)

if self.recaptcha_action != action:
logger.error(
logger.warning(
"ReCAPTCHA validation failed due to value of action '%s'"
" is not equal with defined '%s'.",
action,
Expand Down

0 comments on commit 2536f0c

Please sign in to comment.