iflytek/astron-agent · warning · BusinessException
PARAMETER_ERROR
PARAMETER_ERROR
Error message
PARAMETER_ERROR
What it means
exportSkill rejects the request upfront with PARAMETER_ERROR when the request body or its mandatory identifiers are missing. exportSkill requires both botId and workflowId to locate the bot's published API and the workflow definition.
Solutions
- Include both botId and workflowId in the request payload and resend.
- Validate the client form so the export button is disabled until a bot and workflow are selected.
- Check the HTTP layer isn't stripping the body (wrong content-type, e.g. missing application/json).
- Add client-side required-field validation mirroring the server check.
Example fix
// before
POST /workflow/skill/export
{}
// after
POST /workflow/skill/export
{"botId": 123, "workflowId": 456} Defensive patterns
Strategy: validation
Validate before calling
if (request == null || request.getBotId() == null || request.getWorkflowId() == null) {
throw new IllegalArgumentException("botId and workflowId are required for skill export");
} Type guard
boolean isValidSkillExportRequest(WorkflowSkillExportRequest r) {
return r != null && r.getBotId() != null && r.getWorkflowId() != null;
} Try / catch
try {
return exportSkill(request);
} catch (BusinessException e) {
if ("PARAMETER_ERROR".equals(e.getCode())) {
return badRequest("botId and workflowId must be provided");
}
throw e;
} Prevention
- Disable the export action until bot and workflow are selected in the UI
- Always send Content-Type: application/json with a non-empty body
- Mirror required-field checks client-side before calling the API
When it happens
Trigger: POSTing to the workflow-skill export endpoint with a null body, or a body where botId or workflowId is null/absent — e.g. an empty JSON payload {} or a client that only sends workflowName/description.
Common situations: Frontend form submitted before the workflow/bot was selected; API consumer omitting required fields; serialization dropping null fields and the server then seeing them as absent.
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/da7721af6986811a.
Report an issue: GitHub.
Appendix: source
Thrown at console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/workflow/impl/WorkflowSkillExportServiceImpl.java:54
@Slf4j
@Service
@RequiredArgsConstructor
public class WorkflowSkillExportServiceImpl implements WorkflowSkillExportService {
private static final int METADATA_GENERATION_TIMEOUT_SECONDS = 8;
private static final int SKILL_NAME_MAX_LENGTH = 64;
private static final int SKILL_DESCRIPTION_MAX_LENGTH = 1024;
private static final String SKILL_FILE_NAME = "SKILL.md";
private final WorkflowService workflowService;
private final PublishApiService publishApiService;
private final OpenAiModelProcessService openAiModelProcessService;
private final DataPermissionCheckTool dataPermissionCheckTool;
@Override
public WorkflowSkillExportResponse exportSkill(WorkflowSkillExportRequest request) {
if (request == null || request.getBotId() == null || request.getWorkflowId() == null) {
throw new BusinessException(ResponseEnum.PARAMETER_ERROR);
}
Workflow workflow = workflowService.getById(request.getWorkflowId());
if (workflow == null) {
throw new BusinessException(ResponseEnum.BOT_NOT_EXIST);
}
dataPermissionCheckTool.checkWorkflowBelong(workflow, SpaceInfoUtil.getSpaceId());
String workflowName = StringUtils.defaultIfBlank(request.getWorkflowName(), workflow.getName());
String workflowDescription =
StringUtils.defaultIfBlank(request.getWorkflowDescription(), workflow.getDescription());
if (StringUtils.isBlank(workflowName) || StringUtils.isBlank(workflowDescription)) {
throw new BusinessException(ResponseEnum.WORKFLOW_SKILL_NAME_DESC_EMPTY);
}
BotApiInfoDTO apiInfo = publishApiService.getApiInfo(request.getBotId());
if (!hasPublishedApi(apiInfo)) {
throw new BusinessException(ResponseEnum.WORKFLOW_SKILL_API_NOT_READY);View on GitHub (pinned to 5e758547a8)