alibaba/nacos · error · NacosApiException
PARAMETER_MISSING
PARAMETER_MISSING
Error message
Required parameter 'label' type String is not present
What it means
Thrown by PromptLabelForm.validate() when label is blank. This form extends PromptForm and backs the label-unbind endpoint (PromptAdminController.unbindLabel). super.validate() checks promptKey first. Maps to ErrorCode.PARAMETER_MISSING (code 10000), HTTP 400.
Source
Thrown at ai/src/main/java/com/alibaba/nacos/ai/form/prompt/PromptLabelForm.java:37
import com.alibaba.nacos.api.exception.NacosException;
import com.alibaba.nacos.api.exception.api.NacosApiException;
import com.alibaba.nacos.api.model.v2.ErrorCode;
import com.alibaba.nacos.common.utils.StringUtils;
/**
* Prompt label form.
*
* @author nacos
*/
public class PromptLabelForm extends PromptForm {
private String label;
@Override
public void validate() throws NacosApiException {
super.validate();
if (StringUtils.isBlank(label)) {
throw new NacosApiException(NacosException.INVALID_PARAM, ErrorCode.PARAMETER_MISSING,
"Required parameter 'label' type String is not present");
}
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}
View on GitHub (pinned to 9b989acdf1)
Solutions
- Provide the specific non-blank label to unbind.
- To remove multiple labels, call once per label.
- Ensure promptKey is also present.
Example fix
// before promptKey=myPrompt // after promptKey=myPrompt&label=stable
Defensive patterns
Strategy: validation
Validate before calling
if (label == null || label.trim().isEmpty()) {
throw new IllegalArgumentException("label required to unbind");
} Type guard
static boolean hasLabel(String l) {
return l != null && !l.trim().isEmpty();
} Try / catch
catch (NacosApiException e) {
if (e.getErrCode() == 10000 && e.getMessage().contains("'label'")) { /* supply label */ }
} Prevention
- Unbind is one-label-at-a-time; loop for multiple.
- Pass the exact label string that was bound.
When it happens
Trigger: Calling DELETE/unbind label (PromptAdminController.unbindLabel) with promptKey set but label omitted.
Common situations: Client sends only promptKey to unbind all labels (not supported — one label at a time); UI submits before selecting which label to remove; field named differently on caller side.
Related errors
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/befef27f939e7995.
Report an issue: GitHub.