{"record":{"id":"f8215c550c94dc6d","repo":"goharbor/harbor","slug":"invalid-scope-should-be-d-d-or-d","errorCode":null,"errorMessage":"invalid scope, should be %d, %d or %d","messagePattern":"invalid scope, should be (.+?), (.+?) or (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/config/metadata/type.go","lineNumber":133,"sourceCode":"\n\tif val > 65535 {\n\t\treturn fmt.Errorf(\"network port should be less than 65535\")\n\t}\n\n\treturn err\n}\n\n// LdapScopeType - The LDAP scope is a int type, but its is limit to 0, 1, 2\ntype LdapScopeType struct {\n\tIntType\n}\n\n// validate - Verify the range is limited\nfunc (t *LdapScopeType) validate(str string) error {\n\tif str == \"0\" || str == \"1\" || str == \"2\" {\n\t\treturn nil\n\t}\n\treturn fmt.Errorf(\"invalid scope, should be %d, %d or %d\",\n\t\tcommon.LDAPScopeBase,\n\t\tcommon.LDAPScopeOnelevel,\n\t\tcommon.LDAPScopeSubtree)\n}\n\n// Int64Type ...\ntype Int64Type struct {\n}\n\nfunc (t *Int64Type) validate(str string) error {\n\t_, err := parseInt64(str)\n\treturn err\n}\n\nfunc (t *Int64Type) get(str string) (any, error) {\n\treturn parseInt64(str)\n}\n","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/lib/config/metadata/type.go#L115-L151","documentation":"Error \"invalid scope, should be %d, %d or %d\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/lib/config/metadata/type.go:133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}