fastapi/full-stack-fastapi-template · error · HTTPException
The user with this username does not exist in the system.
Error message
The user with this username does not exist in the system.
What it means
Error "The user with this username does not exist in the system." thrown in fastapi/full-stack-fastapi-template.
Source
Thrown at backend/app/api/routes/login.py:112
db_user=user,
user_in=user_in_update,
)
return Message(message="Password updated successfully")
@router.post(
"/password-recovery-html-content/{email}",
dependencies=[Depends(get_current_active_superuser)],
response_class=HTMLResponse,
)
def recover_password_html_content(email: str, session: SessionDep) -> Any:
"""
HTML Content for Password Recovery
"""
user = crud.get_user_by_email(session=session, email=email)
if not user:
raise HTTPException(
status_code=404,
detail="The user with this username does not exist in the system.",
)
password_reset_token = generate_password_reset_token(email=email)
email_data = generate_reset_password_email(
email_to=user.email, email=email, token=password_reset_token
)
return HTMLResponse(
content=email_data.html_content, headers={"subject:": email_data.subject}
)
View on GitHub (pinned to 8063fe54f1)
When it happens
Trigger: Thrown at backend/app/api/routes/login.py:112 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of fastapi/full-stack-fastapi-template@8063fe54f1 (2026-08-26).
Data as JSON: /api/errors/6719c68c99def81b.
Report an issue: GitHub.