{"record":{"id":"1fc270a4d69754ac","repo":"iflytek/astron-agent","slug":"failed-to-get-workflow-config-for-market-prepare-botid","errorCode":null,"errorMessage":"Failed to get workflow config for market prepare: botId={}","messagePattern":"Failed to get workflow config for market prepare: botId=(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/publish/impl/BotPublishServiceImpl.java","lineNumber":554,"sourceCode":"        }\n    }\n\n    private MarketPrepareDto getMarketPrepareData(Integer botId, BotDetailResponseDto botDetail, String currentUid, Long spaceId) {\n        log.info(\"Getting market prepare data: botId={}\", botId);\n\n        MarketPrepareDto marketData = new MarketPrepareDto();\n        marketData.setPublishType(ReleaseTypeEnum.MARKET.name());\n\n        // Get workflow configuration JSON\n        try {\n            String flowId = userLangChainDataService.findFlowIdByBotId(botId);\n            if (flowId != null) {\n                // TODO: Get complete workflow configuration JSON\n                // This should call the workflow service to get the full configuration\n                marketData.setWorkflowConfigJson(\"{}\");\n            }\n        } catch (Exception e) {\n            log.warn(\"Failed to get workflow config for market prepare: botId={}\", botId, e);\n        }\n\n        // Set bot basic info\n        marketData.setBotName(botDetail.getBotName());\n        marketData.setBotDescription(botDetail.getBotDesc());\n        marketData.setBotAvatar(null);\n\n        // Set multi-file parameter support based on extraInputsConfig\n        boolean isMultiFileParam = false;\n        try {\n            UserLangChainInfo chainInfo = userLangChainDataService.findOneByBotId(botId);\n            if (chainInfo != null && chainInfo.getExtraInputsConfig() != null) {\n                List<JSONObject> extraInputsConfig = JSONArray.parseArray(chainInfo.getExtraInputsConfig(), JSONObject.class);\n                isMultiFileParam = BotFileParamUtil.isMultiFileParam(botId, extraInputsConfig);\n            }\n        } catch (Exception e) {\n            log.warn(\"Failed to determine multi-file parameter support: botId={}\", botId, e);\n        }","sourceCodeStart":536,"sourceCodeEnd":572,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/backend/hub/src/main/java/com/iflytek/astron/console/hub/service/publish/impl/BotPublishServiceImpl.java#L536-L572","documentation":"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.","triggerScenarios":"getMarketPrepareData (via getPrepareData) hits an exception while resolving botDetail/flowId or building the workflow config for the given botId.","commonSituations":"Workflow service unavailable; bot record missing botDetail; DB errors while loading langchain data during marketplace prepare flow.","solutions":["Inspect the logged stack trace for the underlying exception cause","Verify the bot has valid detail and flow linkage before calling getPrepareData","Implement the TODO that fetches the full workflow config JSON from the workflow service"],"exampleFix":"// before\nmarketData.setWorkflowConfigJson(\"{}\");\n} catch (Exception e) {\n    log.warn(\"Failed to get workflow config for market prepare: botId={}\", botId, e);\n}\n// after\nString configJson = workflowService.getFullConfig(flowId);\nmarketData.setWorkflowConfigJson(configJson);","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":["workflow","marketplace","config"],"backgroundTag":"api-request-failed","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-19T12:17:13.211Z"}