{"record":{"id":"70409534b4a33ea4","repo":"goharbor/harbor","slug":"network-port-should-be-greater-than-0","errorCode":null,"errorMessage":"network port should be greater than 0","messagePattern":"network port should be greater than 0","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/config/metadata/type.go","lineNumber":113,"sourceCode":"\treturn err\n}\n\nfunc (t *IntType) get(str string) (any, error) {\n\treturn parseInt(str)\n}\n\n// PortType ...\ntype PortType struct {\n\tIntType\n}\n\nfunc (t *PortType) validate(str string) error {\n\tval, err := strconv.Atoi(str)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif val < 0 {\n\t\treturn fmt.Errorf(\"network port should be greater than 0\")\n\t}\n\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","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/lib/config/metadata/type.go#L95-L131","documentation":"Error \"network port should be greater than 0\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/lib/config/metadata/type.go:113 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"}