Skip to content

Commit

Permalink
make code check happy
Browse files Browse the repository at this point in the history
  • Loading branch information
meln1k committed Sep 4, 2024
1 parent 4a2bd4a commit 2e6e098
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fixbackend/auth/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from fastapi import APIRouter, Depends, HTTPException, Request, Response, status, Form
from fastapi_users.authentication import AuthenticationBackend, Strategy
from fastapi_users.exceptions import UserAlreadyExists, InvalidPasswordException
from fastapi_users.exceptions import UserAlreadyExists, InvalidPasswordException, UserNotExists
from fastapi_users.router import ErrorCode
from fastapi_users.router.oauth import generate_state_token
from httpx_oauth.clients.google import GoogleOAuth2
Expand Down Expand Up @@ -187,7 +187,7 @@ async def login(
maybe_existing = await user_manager.get_by_email(credentials.username)
if maybe_existing:
metric = FailedLoginAttempts.labels(user_id=maybe_existing.id)
except Exception:
except UserNotExists:
pass

metric.inc()
Expand Down

0 comments on commit 2e6e098

Please sign in to comment.