yikart/AiToEarn · error · AppHttpException
ErrHttpBack.err_no_power_login
ErrHttpBack.err_no_power_login
Error message
err_no_power_login
What it means
After successful phone-code login (existing or newly created user), the controller checks userInfo.status; if it equals UserStatus.STOP (banned/disabled), err_no_power_login is thrown and no auth token is issued.
Source
Thrown at project/aitoearn-electron/server/src/user/userLogin.controller.ts:105
// 验证短信验证码
if (process.env.NODE_ENV !== 'development' && code !== 'yika888666') {
const res = await this.loginService.verifyPhoneCode(
phone,
code,
LoginTypeCacheKey.Code,
);
if (!res) throw new AppHttpException(ErrHttpBack.err_user_code_nohad);
}
let userInfo: User = await this.userService.getUserInfoByPhone(phone);
if (!userInfo) {
const newUser = new NewUserByPhone(phone);
if (!!inviteCode) newUser.inviteCode = inviteCode;
userInfo = await this.userService.createUser(newUser);
}
if (userInfo.status === UserStatus.STOP)
throw new AppHttpException(ErrHttpBack.err_no_power_login);
const token = await this.authService.generateToken(userInfo);
const TokenInfo = await this.authService.decodeToken(token);
return {
token,
exp: TokenInfo.exp,
userInfo: await this.userService.getUserInfoById(TokenInfo.id),
};
}
@ApiOperation({
description: '手机号一键认证登录',
summary: '手机号一键认证登录',
})
@Public()
@Post('login/auth/phone')
async loginByPhoneAuth(View on GitHub (pinned to d3aa8bea5b)
Solutions
- Contact an admin to check the account status and re-enable it via PUT :id/status
- Use a different, active account
- Verify you're logging into the correct environment (the banned account may be from another DB)
Example fix
// before
await loginApi.loginByPhoneCode(phone, code); // throws if banned
// after
try {
await loginApi.loginByPhoneCode(phone, code);
} catch (e) {
showAccountDisabledMessage(); // direct user to support/admin appeal
} Defensive patterns
Strategy: try-catch
Validate before calling
const status = await userApi.getStatus?.(); if (status === 'STOP') showAccountDisabledMessage(); // avoid login attempt
Try / catch
try {
const { token } = await loginApi.loginByPhoneCode(phone, code);
} catch (e) {
if (e.response?.message === 'err_no_power_login') {
showAccountDisabledMessage(); // appeal to admin/support
}
} Prevention
- Surface a clear 'account disabled' message rather than a generic failure
- Provide an appeal/contact-support path in the login UI
- Admins should notify users before setting status to STOP
When it happens
Trigger: Login attempt by a user whose account status is STOP — typically set by an admin via updateUserStatus.
Common situations: Banned account trying to log in; test account disabled by an admin; environment data carrying over a stopped status; user believes they registered fine but the account was later disabled.
Related errors
- InvalidAiTaskId
- AiLogNotFound
- ResponseCode.ChannelAccountAlreadyConnectedToAnotherUser
- ResponseCode.ChannelAccountNotAuthorized
- ChannelAccountAlreadyConnectedToAnotherUser
AI-assisted analysis of yikart/AiToEarn@d3aa8bea5b (2026-08-31).
Data as JSON: /api/errors/58cce10d30de13ac.
Report an issue: GitHub.