refactor: Use fastapi exception instead of custom exception
Return the use of fastapi exception instead of custom exception Refactor COG-502
This commit is contained in:
parent
6eecc39db0
commit
90287e0dac
1 changed files with 2 additions and 2 deletions
|
|
@ -8,7 +8,7 @@ from fastapi_users.db import SQLAlchemyUserDatabase
|
|||
from .get_user_db import get_user_db
|
||||
from .models import User
|
||||
from .methods import get_user
|
||||
from cognee.exceptions import UserNotFoundError
|
||||
from fastapi_users.exceptions import UserNotExists
|
||||
|
||||
|
||||
class UserManager(UUIDIDMixin, BaseUserManager[User, uuid.UUID]):
|
||||
|
|
@ -26,7 +26,7 @@ class UserManager(UUIDIDMixin, BaseUserManager[User, uuid.UUID]):
|
|||
user = await get_user(id)
|
||||
|
||||
if user is None:
|
||||
raise UserNotFoundError
|
||||
raise UserNotExists()
|
||||
|
||||
return user
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue