{"record":{"id":"a0ae8e6e84be1297","repo":"makeplane/plane","slug":"5060","errorCode":"5060","errorMessage":"USER_DOES_NOT_EXIST","messagePattern":"USER_DOES_NOT_EXIST","errorType":"exception","errorClass":"AuthenticationException","httpStatus":null,"severity":"error","filePath":"apps/api/plane/authentication/provider/credentials/email.py","lineNumber":67,"sourceCode":"\n            super().set_user_data({\n                \"email\": self.key,\n                \"user\": {\n                    \"avatar\": \"\",\n                    \"first_name\": \"\",\n                    \"last_name\": \"\",\n                    \"provider_id\": \"\",\n                    \"is_password_autoset\": False,\n                },\n            })\n            return\n        else:\n            user = User.objects.filter(email=self.key).first()\n\n            # User does not exists\n            if not user:\n                self.logger.warning(\"User does not exist\")\n                raise AuthenticationException(\n                    error_message=\"USER_DOES_NOT_EXIST\",\n                    error_code=AUTHENTICATION_ERROR_CODES[\"USER_DOES_NOT_EXIST\"],\n                    payload={\"email\": self.key},\n                )\n\n            # Check user password\n            if not user.check_password(self.code):\n                self.logger.warning(\"Authentication failed - invalid credentials\")\n                raise AuthenticationException(\n                    error_message=(\n                        \"AUTHENTICATION_FAILED_SIGN_UP\" if self.is_signup else \"AUTHENTICATION_FAILED_SIGN_IN\"\n                    ),\n                    error_code=AUTHENTICATION_ERROR_CODES[\n                        (\"AUTHENTICATION_FAILED_SIGN_UP\" if self.is_signup else \"AUTHENTICATION_FAILED_SIGN_IN\")\n                    ],\n                    payload={\"email\": self.key},\n                )\n","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/makeplane/plane/blob/1c8a60f858d8472aa56e29994ec1c7926da2c6ce/apps/api/plane/authentication/provider/credentials/email.py#L49-L85","documentation":"Raised in EmailProvider.set_user_data (email.py:67) during sign-in (is_signup=False) when no User matches User.objects.filter(email=self.key).first(). It returns code 5060 with payload {email} before any password check, confirming the account does not exist.","triggerScenarios":"Sign-in attempt where the email is not registered: the lookup returns None, the warning 'User does not exist' is logged, and AuthenticationException code 5060 is raised. Only the sign-in branch (is_signup=False) hits this.","commonSituations":"Typo in the email address, user never signed up, user signed up via OAuth/magic-code under a different email, or the account was hard-deleted.","solutions":["Verify the email spelling and use the same address used at signup.","If new, complete the sign-up flow first (if ENABLE_EMAIL_PASSWORD allows).","Check whether the account exists under an OAuth-linked identity and link/use that instead."],"exampleFix":"// before: POST sign-in with unregistered email -> 5060\n// after: sign up first, or sign in with the OAuth identity actually registered","handlingStrategy":"validation","validationCode":"from plane.db.models import User\n\ndef user_exists_for_signin(email: str) -> bool:\n    return User.objects.filter(email=email).exists()","typeGuard":null,"tryCatchPattern":"try:\n    provider.set_user_data()\nexcept AuthenticationException as e:\n    if e.error_code == 5060:\n        suggest_signup_or_linked_identities(email=e.payload.get('email'))\n    else:\n        raise","preventionTips":["Offer a unified 'find your account' flow that checks email existence first.","Link OAuth identities so users sign in with whichever method they registered."],"tags":["authentication","signin","email-password","not-found"],"backgroundTag":null,"analyzedSha":"1c8a60f858d8472aa56e29994ec1c7926da2c6ce","analyzedAt":"2026-08-12T14:44:31.636Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}