alibaba/nacos · error · NacosApiException

20002

20002

Error message

invalid dataId : {}

What it means

Error "invalid dataId : {}" thrown in alibaba/nacos.

Source

Thrown at config/src/main/java/com/alibaba/nacos/config/server/utils/ParamUtils.java:87

        return true;
    }
    
    private static boolean isValidChar(char ch) {
        for (char c : validChars) {
            if (c == ch) {
                return true;
            }
        }
        return false;
    }
    
    /**
     * Check the parameter for [v1] and [v2].
     */
    public static void checkParam(String dataId, String group, String datumId, String content)
        throws NacosException {
        if (StringUtils.isBlank(dataId) || !isValid(dataId.trim())) {
            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(),
                ErrorCode.PARAMETER_VALIDATE_ERROR,
                "invalid dataId : " + dataId);
        } else if (StringUtils.isBlank(group) || !isValid(group)) {
            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(),
                ErrorCode.PARAMETER_VALIDATE_ERROR,
                "invalid group : " + group);
        } else if (StringUtils.isBlank(datumId) || !isValid(datumId)) {
            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(),
                ErrorCode.PARAMETER_VALIDATE_ERROR,
                "invalid datumId : " + datumId);
        } else if (StringUtils.isBlank(content)) {
            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(),
                ErrorCode.PARAMETER_VALIDATE_ERROR,
                "content is blank : " + content);
        } else if (content.length() > PropertyUtil.getMaxContent()) {
            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(),
                ErrorCode.PARAMETER_VALIDATE_ERROR,
                "invalid content, over " + PropertyUtil.getMaxContent());

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Correct the invalid value for invalid dataId to match the expected format or allowed set, then retry.

When it happens

Trigger: Thrown at config/src/main/java/com/alibaba/nacos/config/server/utils/ParamUtils.java:87 when the library encounters an invalid state.

Common situations: A config request used a dataId containing illegal characters.


AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14). Data as JSON: /api/errors/a07ef26f448613be. Report an issue: GitHub.