{"record":{"id":"28f6940a99d93a1a","repo":"mem0ai/mem0","slug":"invalid-email-or-password","errorCode":null,"errorMessage":"Invalid email or password.","messagePattern":"Invalid email or password\\.","errorType":"http","errorClass":"HTTPException","httpStatus":401,"severity":"error","filePath":"server/routers/auth.py","lineNumber":131,"sourceCode":"        db.rollback()\n        raise HTTPException(status_code=403, detail=\"Registration is closed. An admin account already exists.\")\n    db.refresh(user)\n\n    capture_admin_registered(email=body.email)\n\n    return TokenResponse(\n        access_token=create_access_token(str(user.id), user.role),\n        refresh_token=create_refresh_token(str(user.id), db),\n    )\n\n\n@router.post(\"/login\", response_model=TokenResponse)\n@limiter.limit(\"10/minute\")\ndef login(request: Request, body: LoginRequest, db: Session = Depends(get_db)):\n    user = db.scalar(select(User).where(User.email == body.email))\n    if user is None:\n        dummy_verify_password()\n        raise HTTPException(status_code=401, detail=\"Invalid email or password.\")\n    if not verify_password(body.password, user.password_hash):\n        raise HTTPException(status_code=401, detail=\"Invalid email or password.\")\n\n    user.last_login_at = datetime.now(timezone.utc)\n    db.commit()\n\n    return TokenResponse(\n        access_token=create_access_token(str(user.id), user.role),\n        refresh_token=create_refresh_token(str(user.id), db),\n    )\n\n\n@router.post(\"/refresh\", response_model=TokenResponse)\n@limiter.limit(\"20/minute\")\ndef refresh(request: Request, body: RefreshRequest, db: Session = Depends(get_db)):\n    payload = decode_token(body.refresh_token)\n    if payload.get(\"type\") != \"refresh\":\n        raise HTTPException(status_code=401, detail=\"Invalid token type.\")","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/server/routers/auth.py#L113-L149","documentation":"Error \"Invalid email or password.\" thrown in mem0ai/mem0.","triggerScenarios":"Thrown at server/routers/auth.py:131 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the email and password; use password reset or re-register if the account does not exist."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}