alibaba/spring-ai-alibaba · error · BizException
AccountLoginError
AccountLoginError
Error message
Login error, please check username and password.
What it means
Login failure in AccountServiceImpl.login: thrown as BizException(ACCOUNT_LOGIN_ERROR) when getAccountByName returns null (unknown username) or the supplied password does not match the stored credential. Deliberately generic to avoid revealing which credential was wrong.
Solutions
- Verify username exists and password is correct
- Check the password encoder/verification logic if all valid logins fail
- Confirm the account is not in a deactivated state where lookup is skipped
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-core/src/main/java/com/alibaba/cloud/ai/studio/core/base/service/impl/AccountServiceImpl.java:100 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of alibaba/spring-ai-alibaba@f82da0b50f (2026-09-09).
Data as JSON: /api/errors/857a7791fa47055d.
Report an issue: GitHub.
Appendix: source
Thrown at spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-core/src/main/java/com/alibaba/cloud/ai/studio/core/base/service/impl/AccountServiceImpl.java:100
/** workspace service */
private final WorkspaceService workspaceService;
private final ProviderManager providerManager;
/** model manager */
private final ModelManager modelManager;
/**
* Authenticates user and generates access tokens
* @param loginRequest Login credentials
* @return Token response containing access and refresh tokens
*/
@Override
public TokenResponse login(LoginRequest loginRequest) {
AccountEntity accountEntity = getAccountByName(loginRequest.getUsername());
if (accountEntity == null) {
throw new BizException(ErrorCode.ACCOUNT_LOGIN_ERROR.toError());
}
if (!PasswordCryptUtils.match(loginRequest.getPassword(), accountEntity.getPassword())) {
throw new BizException(ErrorCode.ACCOUNT_LOGIN_ERROR.toError());
}
accountEntity.setGmtLastLogin(new Date());
this.updateById(accountEntity);
// cache it
Workspace workspace = workspaceService.getDefaultWorkspace(accountEntity.getAccountId());
if (workspace == null) {
throw new BizException(ErrorCode.DEFAULT_WORKSPACE_NOT_FOUND.toError());
}
accountEntity.setDefaultWorkspaceId(workspace.getWorkspaceId());
String key = getAccountCacheKey(accountEntity.getAccountId());
redisManager.put(key, accountEntity);View on GitHub (pinned to f82da0b50f)