alibaba/nacos · error · NacosApiException
10000
10000
Error message
The parameters quota, maxSize, maxAggrCount, maxAggrSize cannot be empty at the same time
What it means
Thrown by UpdateCapacityForm.validate() when all four capacity parameters (quota, maxSize, maxAggrCount, maxAggrSize) are null simultaneously. Returns HTTP 400 code 10000 (PARAMETER_MISSING). At least one capacity value must be provided to perform an update.
Source
Thrown at config/src/main/java/com/alibaba/nacos/config/server/model/form/UpdateCapacityForm.java:98
return maxAggrCount;
}
public void setMaxAggrCount(Integer maxAggrCount) {
this.maxAggrCount = maxAggrCount;
}
public Integer getMaxAggrSize() {
return maxAggrSize;
}
public void setMaxAggrSize(Integer maxAggrSize) {
this.maxAggrSize = maxAggrSize;
}
@Override
public void validate() throws NacosApiException {
if (quota == null && maxSize == null && maxAggrCount == null && maxAggrSize == null) {
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,
"The parameters quota, maxSize, maxAggrCount, maxAggrSize cannot be empty at the same time");
}
}
/**
* Check namespaceId and groupName.
*
* @param capacityService capacity service
* @throws NacosApiException NacosApiException
*/
public void checkNamespaceIdAndGroupName(CapacityService capacityService)
throws NacosApiException {
if (StringUtils.isBlank(groupName) && StringUtils.isBlank(namespaceId)) {
capacityService.initAllCapacity();
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,
"At least one of the parameters (groupName or namespaceId) must be provided");
}
}View on GitHub (pinned to 9b989acdf1)
Solutions
- Provide at least one of quota, maxSize, maxAggrCount, or maxAggrSize in the request.
- Populate only the capacity dimension you want to change; the others remain unchanged on the server.
- Validate the form client-side to ensure at least one field is set.
Example fix
// before
PUT /v3/admin/cs/capacity { "namespaceId":"", "groupName":"G" } // no capacity
// after
PUT /v3/admin/cs/capacity { "namespaceId":"", "groupName":"G", "quota":1000 } Defensive patterns
Strategy: validation
Validate before calling
if (quota == null && maxSize == null && maxAggrCount == null && maxAggrSize == null) {
throw new IllegalArgumentException("At least one capacity field must be set");
} Try / catch
try { capacityApi.update(form); }
catch (NacosApiException e) {
if (e.getErrCode() == ErrorCode.PARAMETER_MISSING.getCode())
{ /* supply a capacity value */ } else throw e;
} Prevention
- Always set at least one capacity dimension when updating.
- Validate the form client-side.
When it happens
Trigger: Calling PUT /v3/admin/cs/capacity (or the capacity update API) with no capacity fields set in the request body. Each field is optional individually, but all-null is rejected.
Common situations: Capacity update form submitted empty; JSON body with null values for all four fields; frontend sending the form without any user-filled capacity input.
Related errors
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/2eb95fcf23159c30.
Report an issue: GitHub.