{"record":{"id":"300473dee17ec86f","repo":"alibaba/spring-ai-alibaba","slug":"missing-params-300473","errorCode":"MISSING_PARAMS","errorMessage":"request or appId is null","messagePattern":"request or appId is null","errorType":"error_code","errorClass":"BizException","httpStatus":null,"severity":"error","filePath":"spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-start/src/main/java/com/alibaba/cloud/ai/studio/admin/builder/controller/WorkflowController.java","lineNumber":138,"sourceCode":"\t\tthis.workflowExecuteManager = workflowExecuteManager;\n\t\tthis.workflowInnerService = workflowInnerService;\n\t}\n\n\t/**\n\t * Executes a workflow task in debug mode. This endpoint allows running workflow tasks\n\t * with debug capabilities, enabling step-by-step execution and detailed monitoring.\n\t * @param request Task execution request containing: - appId: Application identifier -\n\t * version: Application version (defaults to \"latest\") - inputs: Input parameters for\n\t * the workflow - conversationId: Session identifier for tracking\n\t * @return TaskRunResponse containing: - taskId: Unique identifier for the executed\n\t * task - conversationId: Session identifier - requestId: Request tracking identifier\n\t */\n\t@PostMapping(value = { \"/workflow/debug/run-task\" })\n\tpublic Result<TaskRunResponse> runDebugTask(@RequestBody TaskRunRequest request) {\n\t\tif (request == null || StringUtils.isBlank(request.getAppId())) {\n\t\t\tLogUtils.monitor(\"WorkflowService\", \"runTask\", System.currentTimeMillis(), FAIL, request,\n\t\t\t\t\t\"request or appId is null\");\n\t\t\tthrow new BizException(ErrorCode.MISSING_PARAMS.toError(\"request or appId is null\"));\n\t\t}\n\t\tString version = request.getVersion();\n\t\tif (version == null) {\n\t\t\tversion = \"latest\";\n\t\t}\n\t\tApplicationVersion appVersion = appService.getAppVersion(request.getAppId(), version);\n\t\tWorkflowContext workflowContext = new WorkflowContext();\n\t\tworkflowContext.setInvokeSource(InvokeSourceEnum.console.getCode());\n\t\tTaskRunResponse response = workflowExecuteManager.runTask(appVersion, request.getInputs(),\n\t\t\t\trequest.getConversationId(), workflowContext);\n\t\treturn Result.success(response);\n\t}\n\n\t/**\n\t * Retrieves the current execution status of a workflow task. This endpoint provides\n\t * detailed information about the task's progress, including node execution status and\n\t * results.\n\t * @param request Process status request containing: - taskId: Task identifier to","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/alibaba/spring-ai-alibaba/blob/f82da0b50f35744c13968191be2b1cd2452ef550/spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-start/src/main/java/com/alibaba/cloud/ai/studio/admin/builder/controller/WorkflowController.java#L120-L156","documentation":"WorkflowController.runDebugTask throws BizException with code MISSING_PARAMS when the POST /workflow/debug/run-task body is null or its appId field is blank. A debug task run must know which application to execute, so the request is rejected before resolving the app version; a monitor log records the failure.","triggerScenarios":"POSTing to /workflow/debug/run-task with no body, a body lacking appId, or appId as an empty/whitespace string; also direct invocation with a null request.","commonSituations":"Debug runner invoked before an app is created/saved, JSON key mismatch (applicationId vs appId) deserializing to null, or missing Content-Type so the body is never bound.","solutions":["Send a JSON body containing a non-blank appId with Content-Type: application/json","Ensure the workflow/app is saved so a valid appId exists before running the debug task","Verify the field name matches TaskRunRequest.getAppId() in the client payload"],"exampleFix":"// before\n{\"graph\": {...}} // appId missing\n// after\n{\"appId\":\"app-123\",\"graph\":{...}}","handlingStrategy":"validation","validationCode":"if (!request || !request.appId || !request.appId.trim()) throw new Error('appId is required to run a debug task');\nawait fetch('/workflow/debug/run-task', { method: 'POST', headers: {'Content-Type':'application/json'}, body: JSON.stringify(request) });","typeGuard":"function canRunTask(req) { return !!req && typeof req.appId === 'string' && req.appId.trim() !== ''; }","tryCatchPattern":"try { await runDebugTask(request); } catch (e) { if (e.code === 'MISSING_PARAMS') showError('Save the application before running debug'); else throw e; }","preventionTips":["Save the workflow/app first so an appId exists","Keep the JSON key as appId (camelCase) to match TaskRunRequest","Always send POST bodies with Content-Type: application/json"],"tags":["http","validation","spring","workflow"],"backgroundTag":"missing-required-config-field","analyzedSha":"f82da0b50f35744c13968191be2b1cd2452ef550","analyzedAt":"2026-09-09T15:32:42.421Z","contentChangedAt":"2026-09-09T15:32:42.421Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}