{"record":{"id":"5b5916467ea26814","repo":"fastapi/full-stack-fastapi-template","slug":"the-user-with-this-email-already-exists-in-the-sys-5b5916","errorCode":null,"errorMessage":"The user with this email already exists in the system","messagePattern":"The user with this email already exists in the system","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"backend/app/api/routes/users.py","lineNumber":153,"sourceCode":"    Delete own user.\n    \"\"\"\n    if current_user.is_superuser:\n        raise HTTPException(\n            status_code=403, detail=\"Super users are not allowed to delete themselves\"\n        )\n    session.delete(current_user)\n    session.commit()\n    return Message(message=\"User deleted successfully\")\n\n\n@router.post(\"/signup\", response_model=UserPublic)\ndef register_user(session: SessionDep, user_in: UserRegister) -> Any:\n    \"\"\"\n    Create new user without the need to be logged in.\n    \"\"\"\n    user = crud.get_user_by_email(session=session, email=user_in.email)\n    if user:\n        raise HTTPException(\n            status_code=400,\n            detail=\"The user with this email already exists in the system\",\n        )\n    user_create = UserCreate.model_validate(user_in)\n    user = crud.create_user(session=session, user_create=user_create)\n    return user\n\n\n@router.get(\"/{user_id}\", response_model=UserPublic)\ndef read_user_by_id(\n    user_id: uuid.UUID, session: SessionDep, current_user: CurrentUser\n) -> Any:\n    \"\"\"\n    Get a specific user by id.\n    \"\"\"\n    user = session.get(User, user_id)\n    if user == current_user:\n        return user","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/fastapi/full-stack-fastapi-template/blob/8063fe54f17d19f01720e055103af9cad3d8f55d/backend/app/api/routes/users.py#L135-L171","documentation":"Error \"The user with this email already exists in the system\" thrown in fastapi/full-stack-fastapi-template.","triggerScenarios":"Thrown at backend/app/api/routes/users.py:153 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8063fe54f17d19f01720e055103af9cad3d8f55d","analyzedAt":"2026-08-26T06:49:32.317Z","schemaVersion":2},"datasetVersion":"2026-08-26T07:17:17.940Z"}