Skip to content

Commit 661b74c

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 523158b commit 661b74c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • openedx/core/djangoapps/notifications

openedx/core/djangoapps/notifications/views.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,10 @@ def preference_update_from_encrypted_username_view(request, username, patch=""):
288288
request=request, group="unsubscribe", key=username_from_hash,
289289
rate=settings.ONE_CLICK_UNSUBSCRIBE_RATE_LIMIT, increment=True,
290290
):
291-
logger.warning(
292-
'Rate limit exceeded for one-click unsubscribe request'
291+
logger.info(
292+
'Rate limit exceeded for one-click unsubscribe request: username=%s, ip=%s',
293+
username,
294+
request.META.get('REMOTE_ADDR'),
293295
)
294296
return Response({"error": "Too many requests"}, status=status.HTTP_429_TOO_MANY_REQUESTS)
295297
update_user_preferences_from_patch(username)

0 commit comments

Comments
 (0)