iflytek/astron-agent · warning · BusinessException
LONG_CONTENT_MISS_FILE_INFO
LONG_CONTENT_MISS_FILE_INFO
Error message
LONG_CONTENT_MISS_FILE_INFO
What it means
Thrown in ChatEnhanceServiceImpl.checkFile (called from saveFile) when either fileName or fileUrl is blank. It wraps ResponseEnum.LONG_CONTENT_MISS_FILE_INFO and indicates the upload request lacks the minimal file metadata needed to validate and store the file.
Solutions
- Ensure the upload flow completes and populates both fileName and fileUrl on the VO before calling saveFile.
- Validate the client payload includes fileName and fileUrl; reject empty uploads client-side.
- Check object-storage upload step for silent failures that leave fileUrl null.
- Inspect the request body/serialization if fields are being dropped in transit.
Example fix
// before
if (StringUtils.isBlank(fileName) || StringUtils.isBlank(fileUrl)) {
throw new BusinessException(ResponseEnum.LONG_CONTENT_MISS_FILE_INFO);
}
// after
if (StringUtils.isBlank(fileName) || StringUtils.isBlank(fileUrl)) {
log.warn("Missing file info, uid: {}, fileName blank: {}, fileUrl blank: {}",
uid, StringUtils.isBlank(fileName), StringUtils.isBlank(fileUrl));
throw new BusinessException(ResponseEnum.LONG_CONTENT_MISS_FILE_INFO);
} Defensive patterns
Strategy: validation
Validate before calling
// Guard before calling saveFile:
if (vo == null || vo.getFileName() == null || vo.getFileName().isBlank()
|| vo.getFileUrl() == null || vo.getFileUrl().isBlank()) {
throw new IllegalArgumentException("fileName and fileUrl are required");
} Try / catch
try {
chatEnhanceService.saveFile(vo);
} catch (BusinessException e) {
if (ResponseEnum.LONG_CONTENT_MISS_FILE_INFO == e.getCode()) {
// re-run the object-storage upload to obtain fileUrl, then retry
}
} Prevention
- Verify the object-storage upload succeeded and returned a URL before saveFile.
- Make fileUrl non-optional in the upload DTO.
- Fail fast client-side on missing file metadata.
When it happens
Trigger: saveFile -> checkFile(uid, fileName, fileUrl, fileSize, limitEnum): StringUtils.isBlank(fileName) || StringUtils.isBlank(fileUrl) evaluates true, immediately throwing BusinessException(LONG_CONTENT_MISS_FILE_INFO) before size-limit and daily-count checks.
Common situations: Client uploaded to object storage but did not return the URL in the VO; upload flow partially failed so URL was never populated; frontend sent only fileSize/fileName but omitted fileUrl; serialization dropped the fileUrl field; empty-string filename from a zero-byte or unnamed upload.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- LONG_CONTENT_CHAT_ID_ERROR
- LONG_CONTENT_MISS_FILE_INFO
- LONG_CONTENT_WRONG_BUSINESS_TYPE
- PARAMS_ERROR
- LONG_CONTENT_FILE_SIZE_OUT_LIMIT
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/2e6a49ec4905ede0.
Report an issue: GitHub.
Appendix: source
Thrown at console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/chat/impl/ChatEnhanceServiceImpl.java:219
public void delete(String fileId, Long chatId, String uid) {
chatDataService.deleteChatFileReq(fileId, chatId, uid);
}
/**
* Method to check files, validate if file name, URL and size are valid, and check if the number of
* uploaded files exceeds daily limit.
*
* @param uid User ID
* @param fileName File name
* @param fileUrl File URL
* @param fileSize File size
* @param limitEnum File limit enum, including maximum file size and daily upload count limit
* @throws BusinessException Business exception thrown when file name or URL is empty, business type
* is wrong, file size exceeds limit or daily upload count exceeds limit
*/
private void checkFile(String uid, String fileName, String fileUrl, Long fileSize, ChatFileLimitEnum limitEnum) {
if (StringUtils.isBlank(fileName) || StringUtils.isBlank(fileUrl)) {
throw new BusinessException(ResponseEnum.LONG_CONTENT_MISS_FILE_INFO);
}
if (limitEnum == null) {
throw new BusinessException(ResponseEnum.LONG_CONTENT_WRONG_BUSINESS_TYPE);
}
// Current document size validation
if (fileSize > limitEnum.getMaxSize()) {
throw new BusinessException(ResponseEnum.LONG_CONTENT_FILE_SIZE_OUT_LIMIT);
}
// Daily maximum upload count limit
if (redissonClient.getAtomicLong(limitEnum.getRedisPrefix() + uid).addAndGet(1L) > limitEnum.getDailyUploadNum()) {
redissonClient.getAtomicLong(limitEnum.getRedisPrefix() + uid).addAndGet(-1L);
throw new BusinessException(ResponseEnum.LONG_CONTENT_FILE_NUM_OUT_LIMIT);
}
}
/**
* Handle document upload functionality
*View on GitHub (pinned to 5e758547a8)