{"record":{"id":"91e2f1ab661d2f3c","repo":"iflytek/astron-agent","slug":"parameter-error-91e2f1","errorCode":"PARAMETER_ERROR","errorMessage":"PARAMETER_ERROR","messagePattern":"PARAMETER_ERROR","errorType":"error_code","errorClass":"BusinessException","httpStatus":null,"severity":"error","filePath":"console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/repo/FileInfoV2Service.java","lineNumber":1306,"sourceCode":"                        }\n                    });\n                }\n            }\n        }\n    }\n\n    /**\n     * Retry failed file processing operations (parsing or embedding)\n     *\n     * @param sliceFileVO retry parameters containing file IDs and slice configuration\n     * @param request HTTP servlet request for authentication and context\n     * @throws InterruptedException if thread execution is interrupted\n     * @throws ExecutionException if execution fails\n     * @throws BusinessException if files are currently being processed or configuration is invalid\n     */\n    public void retry(DealFileVO sliceFileVO, HttpServletRequest request) throws InterruptedException, ExecutionException {\n        if (sliceFileVO == null || sliceFileVO.getFileIds() == null) {\n            throw new BusinessException(ResponseEnum.PARAMETER_ERROR);\n        }\n        Long spaceId = SpaceInfoUtil.getSpaceId();\n\n        // 1) Spark: Retry with \"custom splitting\"\n        if (ProjectContent.isSparkRagCompatible(sliceFileVO.getTag())) {\n            normalizeAndValidateSliceConfig(sliceFileVO);\n            retrySparkSplitIfNeeded(sliceFileVO);\n            return;\n        }\n\n        // 2) Non-Spark: Handle \"parse failure retry (including auto-embedding) / embedding failure retry\"\n        // separately\n        List<Long> fileIds = sliceFileVO.getFileIds().stream().map(Long::valueOf).collect(Collectors.toList());\n        if (CollectionUtils.isEmpty(fileIds))\n            return;\n\n        ExecutorService pool = Executors.newFixedThreadPool(fileIds.size());\n        List<FileInfoV2> files = fileInfoV2Mapper.listByIds(fileIds);","sourceCodeStart":1288,"sourceCodeEnd":1324,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/repo/FileInfoV2Service.java#L1288-L1324","documentation":"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.","triggerScenarios":"POSTing to the retry endpoint with no body, or a body missing the fileIds field (e.g. {\"tag\":\"spark\"} with no fileIds).","commonSituations":"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.","solutions":["Include a non-null fileIds array in the retry request body.","Check the frontend always passes the selected file ids to the retry call.","Return a 400-level validation response client-side before invoking the API when fileIds is missing."],"exampleFix":"// before\nretryService.retry(requestBody); // requestBody.fileIds may be null\n// after\nif (requestBody == null || requestBody.getFileIds() == null || requestBody.getFileIds().isEmpty()) {\n    throw new IllegalArgumentException(\"fileIds is required for retry\");\n}\nretryService.retry(requestBody);","handlingStrategy":"validation","validationCode":"if (body == null || body.getFileIds() == null || body.getFileIds().isEmpty()) {\n    return ResponseEntity.badRequest().body(\"fileIds is required\");\n}","typeGuard":"boolean isValidRetryRequest(DealFileVO vo) {\n    return vo != null && vo.getFileIds() != null && !vo.getFileIds().isEmpty();\n}","tryCatchPattern":"try {\n    fileInfoV2Service.retry(vo, request);\n} catch (BusinessException e) {\n    if (e.getResponseEnum() == ResponseEnum.PARAMETER_ERROR) {\n        throw new ResponseStatusException(HttpStatus.BAD_REQUEST, \"fileIds is required\");\n    }\n    throw e;\n}","preventionTips":["Never submit retry without a file selection.","Keep the slice and retry request schemas in sync between frontend types and backend VO.","Validate request bodies with @Valid/JSR-303 at the controller layer."],"tags":["java","spring-boot","validation"],"backgroundTag":"missing-required-argument","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}