iflytek/astron-agent · error · BusinessException

PARAMETER_ERROR

PARAMETER_ERROR

Error message

PARAMETER_ERROR

What it means

FileInfoV2Service.retry throws PARAMETER_ERROR when the DealFileVO request body is null or its fileIds list is null. The retry operation needs at least one file id to re-process, so the method rejects the request up front before doing any space or tag checks.

Solutions

  1. Include a non-null fileIds array in the retry request body.
  2. Check the frontend always passes the selected file ids to the retry call.
  3. Return a 400-level validation response client-side before invoking the API when fileIds is missing.

Example fix

// before
retryService.retry(requestBody); // requestBody.fileIds may be null
// after
if (requestBody == null || requestBody.getFileIds() == null || requestBody.getFileIds().isEmpty()) {
    throw new IllegalArgumentException("fileIds is required for retry");
}
retryService.retry(requestBody);
Defensive patterns

Strategy: validation

Validate before calling

if (body == null || body.getFileIds() == null || body.getFileIds().isEmpty()) {
    return ResponseEntity.badRequest().body("fileIds is required");
}

Type guard

boolean isValidRetryRequest(DealFileVO vo) {
    return vo != null && vo.getFileIds() != null && !vo.getFileIds().isEmpty();
}

Try / catch

try {
    fileInfoV2Service.retry(vo, request);
} catch (BusinessException e) {
    if (e.getResponseEnum() == ResponseEnum.PARAMETER_ERROR) {
        throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "fileIds is required");
    }
    throw e;
}

Prevention

When it happens

Trigger: POSTing to the retry endpoint with no body, or a body missing the fileIds field (e.g. {"tag":"spark"} with no fileIds).

Common situations: Frontend calling retry without selecting files; API client omitting fileIds because the request schema differs between slice and retry endpoints; serialization dropping null fields leading to a null list.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12). Data as JSON: /api/errors/91e2f1ab661d2f3c. Report an issue: GitHub.

Appendix: source

Thrown at console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/repo/FileInfoV2Service.java:1306

                        }
                    });
                }
            }
        }
    }

    /**
     * Retry failed file processing operations (parsing or embedding)
     *
     * @param sliceFileVO retry parameters containing file IDs and slice configuration
     * @param request HTTP servlet request for authentication and context
     * @throws InterruptedException if thread execution is interrupted
     * @throws ExecutionException if execution fails
     * @throws BusinessException if files are currently being processed or configuration is invalid
     */
    public void retry(DealFileVO sliceFileVO, HttpServletRequest request) throws InterruptedException, ExecutionException {
        if (sliceFileVO == null || sliceFileVO.getFileIds() == null) {
            throw new BusinessException(ResponseEnum.PARAMETER_ERROR);
        }
        Long spaceId = SpaceInfoUtil.getSpaceId();

        // 1) Spark: Retry with "custom splitting"
        if (ProjectContent.isSparkRagCompatible(sliceFileVO.getTag())) {
            normalizeAndValidateSliceConfig(sliceFileVO);
            retrySparkSplitIfNeeded(sliceFileVO);
            return;
        }

        // 2) Non-Spark: Handle "parse failure retry (including auto-embedding) / embedding failure retry"
        // separately
        List<Long> fileIds = sliceFileVO.getFileIds().stream().map(Long::valueOf).collect(Collectors.toList());
        if (CollectionUtils.isEmpty(fileIds))
            return;

        ExecutorService pool = Executors.newFixedThreadPool(fileIds.size());
        List<FileInfoV2> files = fileInfoV2Mapper.listByIds(fileIds);

View on GitHub (pinned to 5e758547a8)