iflytek/astron-agent · error · BusinessException

WORKFLOW_FEEDBACK_FAILED

WORKFLOW_FEEDBACK_FAILED

Error message

WORKFLOW_FEEDBACK_FAILED

What it means

This error is thrown by WorkflowService when persisting a user's workflow feedback fails. The service inserts a WorkflowFeedback record (with user info and create time) via workflowFeedbackMapper.insert(); any exception during that DB write is caught, logged with the sid, and rethrown as a generic WORKFLOW_FEEDBACK_FAILED BusinessException, so the original cause is hidden unless you check the logs.

Solutions

  1. Check the service logs for 'Workflow feedback failed, sid=...' to see the underlying exception message
  2. Verify the database is reachable and the workflow_feedback table exists and matches the entity schema
  3. Check that required fields in the feedback request (sid, content) are present and within column length limits
  4. Retry the feedback submission after fixing DB/connectivity issues

Example fix

// before: insert without pre-validation
workflowFeedbackMapper.insert(workflowFeedback);
// after: validate length before insert
if (workflowFeedback.getContent() != null && workflowFeedback.getContent().length() > MAX_FEEDBACK_LENGTH) {
    throw new BusinessException(ResponseEnum.WORKFLOW_QUERY_LENGTH_OUTRANGE);
}
workflowFeedbackMapper.insert(workflowFeedback);
Defensive patterns

Strategy: try-catch

Validate before calling

if (req.getSid() == null || req.getSid().isBlank()) throw new IllegalArgumentException("sid is required");
if (req.getContent() != null && req.getContent().length() > 500) throw new IllegalArgumentException("feedback content too long");

Try / catch

try {
    workflowService.submitFeedback(req);
} catch (BusinessException e) {
    if ("WORKFLOW_FEEDBACK_FAILED".equals(e.getCode())) {
    // show retryable error to user; check server logs for root cause
    }
}

Prevention

When it happens

Trigger: Calling the workflow feedback submission API when workflowFeedbackMapper.insert(workflowFeedback) throws — e.g. DB connection failure, duplicate/invalid sid, column constraint violation, or feedback payload exceeding column length.

Common situations: Database down or connection pool exhausted during feedback submission; feedback text longer than the DB column; missing required NOT NULL field in WorkflowFeedbackReq; schema drift between entity and table after a migration.

Related errors


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

Appendix: source

Thrown at console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/workflow/WorkflowService.java:5594

            throw new BusinessException(ResponseEnum.WORKFLOW_NOT_EXIST);
        }
        assertTopLevelWorkflowExecutableByCurrentUser(workflow);
        return workflow;
    }

    public void feedback(WorkflowFeedbackReq workflowFeedbackReq, HttpServletRequest request) {
        try {
            WorkflowFeedback workflowFeedback = new WorkflowFeedback();
            BeanUtils.copyProperties(workflowFeedbackReq, workflowFeedback);
            String uid = RequestContextUtil.getUID();
            UserInfo userInfo = userInfoDataService.findByUid(uid).orElseThrow();
            workflowFeedback.setUserName(userInfo.getNickname());
            workflowFeedback.setUid(uid);
            workflowFeedback.setCreateTime(new Date());
            workflowFeedbackMapper.insert(workflowFeedback);
        } catch (Exception ex) {
            log.error("Workflow feedback failed, sid={}, error={}", workflowFeedbackReq.getSid(), ex.getMessage(), ex);
            throw new BusinessException(ResponseEnum.WORKFLOW_FEEDBACK_FAILED);
        }

    }

    public List<WorkflowFeedback> getFeedbackList(String flowId) {
        return workflowFeedbackMapper.selectList(Wrappers.lambdaQuery(WorkflowFeedback.class)
                .eq(WorkflowFeedback::getFlowId, flowId)
                .eq(WorkflowFeedback::getUid, UserInfoManagerHandler.getUserId())
                .orderByDesc(WorkflowFeedback::getCreateTime));
    }

    private static void dealWithSearchPromptTemplate(String search, LambdaQueryWrapper<PromptTemplate> wrapper) {
        try {
            String decode = URLDecoder.decode(search, StandardCharsets.UTF_8.name());
            String escaped = decode
                    .replace("\\", "\\\\")
                    .replace("_", "\\_")
                    .replace("%", "\\%");

View on GitHub (pinned to 5e758547a8)