alibaba/spring-ai-alibaba · error · BizException

MISSING_PARAMS

MISSING_PARAMS

Error message

Required parameters [type] missing, please check the request parameters.

What it means

getAppPublishablePageList requires the 'type' field on the AppComponentQuery request. If request.getType() is null the controller aborts with MISSING_PARAMS before querying. 'type' distinguishes which kind of component is being queried.

Source

Thrown at spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-start/src/main/java/com/alibaba/cloud/ai/studio/admin/builder/controller/AppComponentController.java:129

		}
		catch (Exception e) {
			throw new BizException(ErrorCode.APP_COMPONENT_LIST_ERROR.toError());
		}
	}

	/**
	 * Retrieves a paginated list of applications that can be published as components.
	 * This endpoint filters out applications that are already published as components.
	 * @param request Query parameters including: - type: Application type - appName:
	 * Application name
	 * @return Result containing a PagingList of Application objects that can be published
	 * as components
	 */
	@GetMapping("/app-publishable")
	public Result<PagingList<Application>> getAppPublishablePageList(@ApiModelAttribute AppComponentQuery request) {
		RequestContext context = RequestContextHolder.getRequestContext();
		if (Objects.isNull(request.getType())) {
			throw new BizException(ErrorCode.MISSING_PARAMS.toError("type"));
		}

		// component published
		List<AppComponent> appComponentList = appComponentService.getAppComponentListAll(request.getType(),
				AppComponentStatusEnum.Published.getCode());
		List<String> codes = new ArrayList<>();
		if (appComponentList != null && !appComponentList.isEmpty()) {
			codes = appComponentList.stream().map(AppComponent::getAppId).collect(Collectors.toList());
		}
		// application can released to component
		List<Long> ids = appService.getApplicationPublished(request.getType(), request.getAppName(), codes);

		PagingList<Application> componentList = appService.getApplicationPublishedAndNotComponentList(request, codes,
				ids);
		return Result.success(context.getRequestId(), componentList);
	}

	/**

View on GitHub (pinned to f82da0b50f)

Solutions

  1. Add the type parameter to the request, e.g. ?type=plugin (or whatever AppComponentType the client intends).
  2. Update the frontend to always send type when calling /app-publishable.
  3. Check AppComponentQuery binding — ensure the param name matches the field name expected by @ApiModelAttribute.

Example fix

// before
GET /appComponent/app-publishable?pageNum=1&pageSize=10
// after
GET /appComponent/app-publishable?pageNum=1&pageSize=10&type=PLUGIN
Defensive patterns

Strategy: validation

Validate before calling

if (!query.type) throw new Error('type is required for /appComponent/app-publishable');

Type guard

function hasType(q) { return q != null && typeof q.type === 'string' && q.type.length > 0; }

Try / catch

try {
  const page = await api.getAppPublishable(query);
} catch (e) {
  if (e.code === 'MISSING_PARAMS' && /type/.test(e.message)) {
    // prompt user to select a component type
  } else throw e;
}

Prevention

When it happens

Trigger: GET /appComponent/app-publishable without a 'type' query parameter (or with type explicitly bound as null), e.g. ?pageNum=1&pageSize=10 with no type.

Common situations: Frontend omits the component-type selector default value; older clients predating the type field; copied URL missing the type param.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of alibaba/spring-ai-alibaba@f82da0b50f (2026-09-09). Data as JSON: /api/errors/dbf066661ae2337c. Report an issue: GitHub.