paascloud/paascloud-master · error · UacBizException

UAC10011027

UAC10011027

Error message

找不到用户,mobile=%s

What it means

UAC10011027 (message '找不到用户,mobile=%s' — user not found for the given mobile number) is thrown by UacUserServiceImpl.userResetPwd when no user record matches the supplied mobileNo. Resetting the password by mobile phone cannot proceed because the mobile number is not registered to any account.

Solutions

  1. Verify the mobile number exactly matches the registered value, including country code format stored in the DB
  2. Check the DB: SELECT * FROM uac_user WHERE mobile_no = ?; normalize input (trim, strip +86) before the call
  3. Use an alternative reset path (by email via resetLoginPwd) if mobile is not registered
  4. Catch UacBizException code UAC10011027 and prompt 'no account bound to this mobile number'

Example fix

// before
uacUserService.userResetPwd(mobileNo, code, newPwd, confirmPwd);
// after
String normalized = mobileNo.trim().replaceFirst("^\\+86", "");
UacUser u = uacUserService.findByMobileNo(normalized);
if (u != null) {
    uacUserService.userResetPwd(normalized, code, newPwd, confirmPwd);
}
Defensive patterns

Strategy: validation

Validate before calling

UacUser q = new UacUser(); q.setMobileNo(normalizeMobile(mobileNo));
if (uacUserMapper.selectOne(q) == null) { throw new IllegalArgumentException("mobile not registered"); }

Try / catch

try { uacUserService.userResetPwd(mobileNo, code, newPwd, confirmPwd); } catch (UacBizException e) { if ("UAC10011027".equals(e.getCode())) { /* prompt: no account for this mobile */ } }

Prevention

When it happens

Trigger: Calling userResetPwd(mobileNo, verifyCode, newPassword, confirmNewPassword) with a mobileNo that has no matching uac_user row (unregistered number, typo, wrong country code, or user record deleted).

Common situations: User enters a phone number different from the one registered; test environments lacking seeded users; formatting differences (spaces, +86 prefix, leading zeros) causing the exact-match selectOne to miss; users registered through a different identity (email/loginName).

Understand the failure class

Background: "User not found", "Invalid user", and "does not exist": what missing-user lookup errors mean across Rocket.Chat, LiteLLM, Phabricator, rustfs, and pnpm — this error's family across 10 libraries.

Related errors


AI-assisted analysis of paascloud/paascloud-master@781281a950 (2026-09-10). Data as JSON: /api/errors/c18a133aba7a98ee. Report an issue: GitHub.

Appendix: source

Thrown at paascloud-provider/paascloud-provider-uac/src/main/java/com/paascloud/provider/service/impl/UacUserServiceImpl.java:492

		// TODO 发送重置密码成功的邮件
	}

	@Override
	public int userResetPwd(UserResetPwdDto userResetPwdDto) {
		String mobileNo = userResetPwdDto.getMobileNo();
		String newPassword = userResetPwdDto.getNewPassword();
		String confirmPwd = userResetPwdDto.getConfirmPwd();

		Preconditions.checkArgument(!StringUtils.isEmpty(mobileNo), "手机号码不能为空");
		Preconditions.checkArgument(!StringUtils.isEmpty(newPassword), "新密码不能为空");
		Preconditions.checkArgument(!StringUtils.isEmpty(confirmPwd), ErrorCodeEnum.UAC10011009.msg());
		Preconditions.checkArgument(newPassword.equals(confirmPwd), "两次密码不一致");

		UacUser query = new UacUser();
		query.setMobileNo(mobileNo);
		UacUser user = uacUserMapper.selectOne(query);
		if (user == null) {
			throw new UacBizException(ErrorCodeEnum.UAC10011027, mobileNo);
		}

		UacUser uacUser = new UacUser();
		uacUser.setLoginPwd(Md5Util.encrypt(newPassword));
		uacUser.setId(user.getId());

		// 更新用户最后修改人与修改时间
		uacUser.setVersion(user.getVersion() + 1);
		uacUser.setLastOperator(user.getLoginName());
		uacUser.setLastOperatorId(user.getId());
		uacUser.setUpdateTime(new Date());

		return uacUserMapper.updateByPrimaryKeySelective(uacUser);
	}

	@Override
	public void register(UserRegisterDto registerDto) {
		// 校验注册信息

View on GitHub (pinned to 781281a950)