{"record":{"id":"a90669fee9954647","repo":"goharbor/harbor","slug":"s-type-error-a90669","errorCode":null,"errorMessage":"%s type error","messagePattern":"(.+?) type error","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/retention/policy/rule/latestpl/evaluator.go","lineNumber":84,"sourceCode":"\n\tlog.Warningf(\"default parameter %d used for rule %s\", DefaultN, TemplateID)\n\n\treturn &evaluator{n: DefaultN}\n}\n\n// Valid ...\nfunc Valid(params rule.Parameters) error {\n\tif params != nil {\n\t\tif p, ok := params[ParameterN]; ok {\n\t\t\tif v, ok := utils.ParseJSONInt(p); ok {\n\t\t\t\tif v < 0 {\n\t\t\t\t\treturn fmt.Errorf(\"%s is less than zero\", ParameterN)\n\t\t\t\t}\n\t\t\t\tif v >= math.MaxInt16 {\n\t\t\t\t\treturn fmt.Errorf(\"%s is too large\", ParameterN)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn fmt.Errorf(\"%s type error\", ParameterN)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":66,"sourceCodeEnd":90,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/retention/policy/rule/latestpl/evaluator.go#L66-L90","documentation":"Error \"%s type error\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/retention/policy/rule/latestpl/evaluator.go:84 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"}