{"record":{"id":"7e79990e20cdbc25","repo":"alibaba/spring-ai-alibaba","slug":"missing-params-7e7999","errorCode":"MISSING_PARAMS","errorMessage":"app","messagePattern":"app","errorType":"validation","errorClass":"BizException","httpStatus":null,"severity":"warning","filePath":"spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-start/src/main/java/com/alibaba/cloud/ai/studio/admin/builder/controller/AppController.java","lineNumber":73,"sourceCode":"\n\t/** Manager for workflow execution */\n\tprivate final WorkflowExecuteManager workflowExecuteManager;\n\n\tpublic AppController(AppService appService, WorkflowExecuteManager workflowExecuteManager) {\n\t\tthis.appService = appService;\n\t\tthis.workflowExecuteManager = workflowExecuteManager;\n\t}\n\n\t/**\n\t * Creates a new application\n\t * @param app Application details\n\t * @return Created application ID\n\t */\n\t@PostMapping()\n\tpublic Result<String> createApp(@RequestBody Application app) {\n\t\tRequestContext context = RequestContextHolder.getRequestContext();\n\t\tif (Objects.isNull(app)) {\n\t\t\tthrow new BizException(ErrorCode.MISSING_PARAMS.toError(\"app\"));\n\t\t}\n\n\t\tif (StringUtils.isBlank(app.getName())) {\n\t\t\tthrow new BizException(ErrorCode.MISSING_PARAMS.toError(\"name\"));\n\t\t}\n\n\t\tif (Objects.isNull(app.getConfig())) {\n\t\t\tthrow new BizException(ErrorCode.MISSING_PARAMS.toError(\"config\"));\n\t\t}\n\n\t\tString appId = appService.createApp(app);\n\t\treturn Result.success(context.getRequestId(), appId);\n\t}\n\n\t/**\n\t * Updates an existing application\n\t * @param appId Application ID\n\t * @param app Updated application details","sourceCodeStart":55,"sourceCodeEnd":91,"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/AppController.java#L55-L91","documentation":"AppController.createApp throws BizException(ErrorCode.MISSING_PARAMS.toError(\"app\")) when the POST request body deserializes to null. An Application object is required to create an app; a missing/empty body cannot be processed.","triggerScenarios":"POST /app with an empty body, no Content-Type: application/json header causing the body to not bind, or a client sending a literal null body.","commonSituations":"curl calls without -d or without the JSON content type; proxies stripping the body; client code passing null to the HTTP helper.","solutions":["Send a valid JSON Application object as the request body","Set Content-Type: application/json on the request","Validate the body is non-null before calling the API"],"exampleFix":"// before\ncurl -X POST http://host/app\n// after\ncurl -X POST http://host/app -H 'Content-Type: application/json' -d '{\"name\":\"my-app\",\"config\":{}}'","handlingStrategy":"validation","validationCode":"if (app == null) { throw new IllegalArgumentException(\"application body is required\"); }","typeGuard":"boolean hasBody(Application app) { return app != null; }","tryCatchPattern":"try { client.createApp(app); } catch (BizException e) { if (\"MISSING_PARAMS\".equals(e.getCode())) { /* fix request body, no retry */ } }","preventionTips":["Always send a JSON body with Content-Type: application/json","Validate payloads before HTTP calls","Never send literal null bodies"],"tags":["validation","missing-parameter","rest-api"],"backgroundTag":"missing-required-argument","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"}