From 2e6e0980e0386b051ffbd061904ca6523536f33a Mon Sep 17 00:00:00 2001 From: Nikita Melkozerov Date: Wed, 4 Sep 2024 08:59:01 +0000 Subject: [PATCH] make code check happy --- fixbackend/auth/router.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fixbackend/auth/router.py b/fixbackend/auth/router.py index 03026fa9..41f7cc0b 100644 --- a/fixbackend/auth/router.py +++ b/fixbackend/auth/router.py @@ -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 @@ -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()