alibaba/nacos · warning · NacosApiException
10000
10000
Error message
required parameter 'namespaceId' is missing
What it means
NamespaceForm.validate() (used by the update namespace flow) requires namespaceId be non-null, throwing NacosApiException HTTP 400 / ErrorCode.PARAMETER_MISSING (10000). Unlike create, the update form needs the target tenant ID to know which namespace to change.
Source
Thrown at core/src/main/java/com/alibaba/nacos/core/namespace/model/form/NamespaceForm.java:76
return namespaceName;
}
public void setNamespaceName(String namespaceName) {
this.namespaceName = namespaceName;
}
public String getNamespaceDesc() {
return namespaceDesc;
}
public void setNamespaceDesc(String namespaceDesc) {
this.namespaceDesc = namespaceDesc;
}
@Override
public void validate() throws NacosApiException {
if (null == namespaceId) {
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,
"required parameter 'namespaceId' is missing");
}
if (null == namespaceName) {
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,
"required parameter 'namespaceName' is missing");
}
}
}
View on GitHub (pinned to 9b989acdf1)
Solutions
- Send the existing namespaceId on every update.
- Send namespaceName too (it is also required, see 1068).
- Fetch the current namespace id from the list API before updating.
Example fix
// before
PUT .../namespace {"namespaceName":"Dev","namespaceDesc":"..."}
// after
PUT .../namespace {"namespaceId":"dev","namespaceName":"Dev","namespaceDesc":"..."} Defensive patterns
Strategy: validation
Validate before calling
if (namespaceId == null || namespaceId.isBlank()) {
throw new IllegalArgumentException("namespaceId is required for update");
}
if (namespaceName == null || namespaceName.isBlank()) {
throw new IllegalArgumentException("namespaceName is required for update");
} Try / catch
try {
namespaceService.updateNamespace(namespaceId, namespaceName, desc);
} catch (NacosApiException e) {
if (e.getErrCode() == 10000 && e.getMessage().contains("namespaceId")) {
// id missing -> fetch from list API and retry
} else { throw e; }
} Prevention
- Update is a full replace: always resend namespaceId and namespaceName.
- Fetch the current namespace id before editing.
- Do not reuse the create-form payload (id optional) for updates.
When it happens
Trigger: PUT to the namespace update API (ConsoleNamespaceController.updateNamespace / NamespaceControllerV3) without the namespaceId parameter.
Common situations: Reusing the create-form payload (where id is optional) for an update; frontend dropping the id field; passing only the new name/desc.
Related errors
- 10000
- Agent Version namespaceId does not match request
- PARAMETER_VALIDATE_ERROR
- PARAMETER_MISSING
- PARAMETER_MISSING
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/2f6f36aba4f455c2.
Report an issue: GitHub.