alibaba/spring-ai-alibaba · error · BizException
MISSING_PARAMS
MISSING_PARAMS
Error message
MISSING_PARAMS: request
What it means
MISSING_PARAMS with parameter 'request' is thrown by WorkflowServiceImpl.checkAndInitContext (invoked from streamCall) when the WorkflowRequest argument itself is null. It is the first guard in workflow stream initialization, before authentication and appId checks.
Source
Thrown at spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-core/src/main/java/com/alibaba/cloud/ai/studio/core/base/service/impl/WorkflowServiceImpl.java:228
else if (err instanceof TimeoutException) {
error = ErrorCode.WORKFLOW_EXECUTION_TIMEOUT.toError();
}
else {
error = ErrorCode.WORKFLOW_EXECUTE_ERROR.toError(err.getMessage());
}
response.setError(error);
LogUtils.monitor(context, "WorkflowService", "handleThrowable", context.getStartTime(), error.getCode(), null,
response, err);
return Mono.just(response);
}
private void checkAndInitContext(WorkflowContext workflowContext, WorkflowRequest request) {
Long start = System.currentTimeMillis();
RequestContext context = RequestContextHolder.getRequestContext();
try {
// check input params
if (Objects.isNull(request)) {
throw new BizException(ErrorCode.MISSING_PARAMS.toError("request"));
}
String uid = context.getAccountId();
if (Objects.isNull(uid)) {
throw new BizException(ErrorCode.UNAUTHORIZED.toError());
}
String appId = request.getAppId();
if (StringUtils.isBlank(appId)) {
throw new BizException(ErrorCode.MISSING_PARAMS.toError("appId"));
}
// if (CollectionUtils.isEmpty(request.getMessages())) {
// throw new BizException(ErrorCode.MISSING_PARAMS.toError("messages"));
// }
if (Objects.isNull(context.getWorkspaceId())) {
throw new BizException(ErrorCode.MISSING_PARAMS.toError("workspace_id"));View on GitHub (pinned to f82da0b50f)
Solutions
- Always construct and pass a non-null WorkflowRequest to streamCall.
- Check the HTTP caller is sending a valid JSON body with correct Content-Type.
- Catch BizException with code MISSING_PARAMS in the controller and return 400 with the parameter name.
- Add client-side null/emptiness checks before invoking streamCall.
Example fix
// before workflowService.streamCall(context, null); // MISSING_PARAMS: request // after WorkflowRequest request = WorkflowRequest.builder().appId(appId).build(); workflowService.streamCall(context, request);
Defensive patterns
Strategy: validation
Validate before calling
Objects.requireNonNull(request, "WorkflowRequest must not be null");
Type guard
if (request == null) { return badRequest("request body is required"); } Try / catch
try { workflowService.streamCall(ctx, request); } catch (BizException e) { if ("MISSING_PARAMS".equals(e.getCode())) { /* return 400 with e.getMessage() */ } } Prevention
- Send a JSON body with correct Content-Type on workflow calls
- Reject empty bodies at the controller layer
- Never call streamCall with a literal null in code
- Add integration tests covering missing-body requests
When it happens
Trigger: Calling WorkflowService.streamCall(null, ...) or passing a null request body from a controller/endpooint that did not deserialize the payload.
Common situations: HTTP client POSTing an empty body; content-type mismatch so the request body binds to null; internal callers forgetting to build the WorkflowRequest object.
Related errors
- TOOL_PARAMS_MISSING
- MISSING_PARAMS
- WORKFLOW_CONFIG_ILLEGAL
- MISSING_PARAMS
- invalid agent dsl: data is null
AI-assisted analysis of alibaba/spring-ai-alibaba@f82da0b50f (2026-09-09).
Data as JSON: /api/errors/1b8edc1a56e268a9.
Report an issue: GitHub.