fix(users.py): update error message to be more generic and not reveal specific reason for username unavailability

fix(AdminPage/index.tsx): fix nullish assertion for create_at and updated_at properties to avoid potential errors
fix(signUpPage/index.tsx): fix error handling to correctly display error message
fix(types/components/index.ts): make id, create_at, and updated_at properties optional in UserInputType
This commit is contained in:
anovazzi1 2023-08-29 16:44:15 -03:00
commit cf8df6c62b
4 changed files with 7 additions and 7 deletions

View file

@ -43,7 +43,7 @@ def add_user(
db.refresh(new_user)
except IntegrityError as e:
db.rollback()
raise HTTPException(status_code=400, detail="This username is unavailable as it has already been claimed. Please choose a different username.") from e
raise HTTPException(status_code=400, detail="This username is unavailable.") from e
return new_user