{"record":{"id":"2f6e1914feb69894","repo":"alibaba/nacos","slug":"22002","errorCode":"22002","errorMessage":"namespaceId [{}] already exist.","messagePattern":"namespaceId \\[(.+?)\\] already exist\\.","errorType":"http","errorClass":"NacosApiException","httpStatus":400,"severity":"error","filePath":"core/src/main/java/com/alibaba/nacos/core/service/NamespaceOperationService.java","lineNumber":196,"sourceCode":"        try {\n            if (NamespaceUtil.isDefaultNamespaceId(namespaceId)) {\n                return true;\n            }\n            return namespacePersistService.tenantInfoCountByTenantId(namespaceId) > 0;\n        } catch (Exception e) {\n            Loggers.CORE.error(\n                \"Namespace validation query db error for namespace: {}, exception: {}\", namespaceId,\n                e);\n            return false;\n        }\n    }\n    \n    /**\n     * validate namespace not exists.\n     */\n    public void validateNamespaceNotExists(String namespaceId) throws NacosApiException {\n        if (namespaceExists(namespaceId)) {\n            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(),\n                ErrorCode.NAMESPACE_ALREADY_EXIST,\n                \"namespaceId [\" + namespaceId + \"] already exist.\");\n        }\n    }\n}\n","sourceCodeStart":178,"sourceCodeEnd":202,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/core/src/main/java/com/alibaba/nacos/core/service/NamespaceOperationService.java#L178-L202","documentation":"Error \"namespaceId [{}] already exist.\" thrown in alibaba/nacos.","triggerScenarios":"Thrown at core/src/main/java/com/alibaba/nacos/core/service/NamespaceOperationService.java:196 when the library encounters an invalid state.","commonSituations":"Creating a namespace with an id that already exists.","solutions":["Choose a different identifier or update the existing resource instead of creating it again."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}