iflytek/astron-agent · error · BusinessException
USER_APP_ID_CREATE_ERROR
USER_APP_ID_CREATE_ERROR
Error message
USER_APP_ID_CREATE_ERROR
What it means
USER_APP_ID_CREATE_ERROR is thrown when tenantService.createApp returns a blank appId, meaning the tenant microservice failed to allocate an application identity. The console records this as an app-creation failure before any local bookkeeping happens.
Solutions
- Check core/tenant service health and logs (is it up? did createApp reach it?) and retry once healthy.
- Verify the user/space hasn't hit tenant resource quotas; raise quota or free an app slot.
- Inspect hub↔tenant connectivity (service discovery, network policy) and timeout settings.
- If tenant-side duplicate detection rejects silently, align console and tenant uniqueness rules.
Example fix
// before
String appId = tenantService.createApp(uid, name, desc); // blank on silent failure
// after
if (StringUtils.isBlank(appId)) {
log.error("tenantService.createApp returned blank appId: uid={}, name={}", uid, name);
throw new BusinessException(ResponseEnum.USER_APP_ID_CREATE_ERROR);
} Defensive patterns
Strategy: try-catch
Try / catch
try { publishApiService.createApp(vo); }
catch (BusinessException e) { if (e.getCode() == ResponseEnum.USER_APP_ID_CREATE_ERROR) { checkTenantServiceHealthThenRetry(); } else throw e; } Prevention
- Add health checks/alerts on the core/tenant service.
- Enforce and surface tenant quotas before create attempts.
- Set explicit timeouts and circuit breakers on hub→tenant calls.
When it happens
Trigger: Calling createApp when the tenant service (Go, core/tenant) is down, times out, rejects the request (quota, duplicate app at tenant level), or returns an empty/blank app identifier.
Common situations: Tenant service not deployed/reachable in the environment; tenant resource quota exhausted for the user/space; network or timeout between hub and tenant service; tenant DB write failing.
Related errors
- APP_TENANT_NOT_FOUND_ERROR
- BOT_CHAIN_UPDATE_ERROR
- credential file is unavailable
- published legacy tenant credentials cannot be used
- REPO_KNOWLEDGE_QUERY_FAILED
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/e87885df3c7f7124.
Report an issue: GitHub.
Appendix: source
Thrown at console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/publish/impl/PublishApiServiceImpl.java:97
@Autowired
private ReleaseManageClientService releaseManageClientService;
private static final String PUBLISH_API = "publish_api";
private static final String BOT_API_MAAS_URL = "/workflow/v1/chat/completions";
@Override
public Boolean createApp(CreateAppVo createAppVo) {
String uid = RequestContextUtil.getUID();
if (appMstService.exist(createAppVo.getAppName())) {
throw new BusinessException(ResponseEnum.USER_APP_NAME_REPEAT);
}
String appId = tenantService.createApp(uid, createAppVo.getAppName(), createAppVo.getAppDescribe());
if (StringUtils.isBlank(appId)) {
throw new BusinessException(ResponseEnum.USER_APP_ID_CREATE_ERROR);
}
TenantAuth tenantAuth = tenantService.getAppDetail(appId);
if (Objects.isNull(tenantAuth)) {
throw new BusinessException(ResponseEnum.USER_APP_ID_CREATE_ERROR);
}
appMstService.insert(uid, appId, createAppVo.getAppName(), createAppVo.getAppDescribe(), tenantAuth.getApiKey(), tenantAuth.getApiSecret());
return true;
}
@Override
public List<AppListDTO> getAppList() {
String uid = RequestContextUtil.getUID();
return appMstService.getAppListByUid(uid)
.stream()
.map(appMst -> new AppListDTO(appMst.getAppId(), appMst.getAppName(), appMst.getAppDescribe(),
appMst.getAppKey(), appMst.getAppSecret(), appMst.getCreateTime()))
.collect(Collectors.toList());View on GitHub (pinned to 5e758547a8)