iflytek/astron-agent · warning

Failed to get workflow config for market prepare: botId=

Error message

Failed to get workflow config for market prepare: botId={}

What it means

A warn log when fetching the workflow configuration for market prepare data throws; the marketData's workflowConfigJson may remain unset or empty. Underlying exception is swallowed to keep prepare-data assembly resilient.

Solutions

  1. Inspect the logged stack trace for the underlying exception cause
  2. Verify the bot has valid detail and flow linkage before calling getPrepareData
  3. Implement the TODO that fetches the full workflow config JSON from the workflow service

Example fix

// before
marketData.setWorkflowConfigJson("{}");
} catch (Exception e) {
    log.warn("Failed to get workflow config for market prepare: botId={}", botId, e);
}
// after
String configJson = workflowService.getFullConfig(flowId);
marketData.setWorkflowConfigJson(configJson);
Defensive patterns

Strategy: fallback

When it happens

Trigger: getMarketPrepareData (via getPrepareData) hits an exception while resolving botDetail/flowId or building the workflow config for the given botId.

Common situations: Workflow service unavailable; bot record missing botDetail; DB errors while loading langchain data during marketplace prepare flow.

Understand the failure class

Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.

Related errors


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

Appendix: source

Thrown at console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/publish/impl/BotPublishServiceImpl.java:554

        }
    }

    private MarketPrepareDto getMarketPrepareData(Integer botId, BotDetailResponseDto botDetail, String currentUid, Long spaceId) {
        log.info("Getting market prepare data: botId={}", botId);

        MarketPrepareDto marketData = new MarketPrepareDto();
        marketData.setPublishType(ReleaseTypeEnum.MARKET.name());

        // Get workflow configuration JSON
        try {
            String flowId = userLangChainDataService.findFlowIdByBotId(botId);
            if (flowId != null) {
                // TODO: Get complete workflow configuration JSON
                // This should call the workflow service to get the full configuration
                marketData.setWorkflowConfigJson("{}");
            }
        } catch (Exception e) {
            log.warn("Failed to get workflow config for market prepare: botId={}", botId, e);
        }

        // Set bot basic info
        marketData.setBotName(botDetail.getBotName());
        marketData.setBotDescription(botDetail.getBotDesc());
        marketData.setBotAvatar(null);

        // Set multi-file parameter support based on extraInputsConfig
        boolean isMultiFileParam = false;
        try {
            UserLangChainInfo chainInfo = userLangChainDataService.findOneByBotId(botId);
            if (chainInfo != null && chainInfo.getExtraInputsConfig() != null) {
                List<JSONObject> extraInputsConfig = JSONArray.parseArray(chainInfo.getExtraInputsConfig(), JSONObject.class);
                isMultiFileParam = BotFileParamUtil.isMultiFileParam(botId, extraInputsConfig);
            }
        } catch (Exception e) {
            log.warn("Failed to determine multi-file parameter support: botId={}", botId, e);
        }

View on GitHub (pinned to 5e758547a8)