{"record":{"id":"439683bbea05f766","repo":"goharbor/harbor","slug":"bad-web-hook-url-s","errorCode":null,"errorMessage":"bad web hook URL: %s","messagePattern":"bad web hook URL: (.+?)","errorType":"validation","errorClass":null,"httpStatus":500,"severity":"error","filePath":"src/jobservice/period/policy_store.go","lineNumber":64,"sourceCode":"\n// DeSerialize the raw json to policy.\nfunc (p *Policy) DeSerialize(rawJSON []byte) error {\n\treturn json.Unmarshal(rawJSON, p)\n}\n\n// Validate the policy\nfunc (p *Policy) Validate() error {\n\tif utils.IsEmptyStr(p.ID) {\n\t\treturn errors.New(\"missing ID in the periodic job policy object\")\n\t}\n\n\tif utils.IsEmptyStr(p.JobName) {\n\t\treturn errors.New(\"missing job name in the periodic job policy object\")\n\t}\n\n\tif !utils.IsEmptyStr(p.WebHookURL) {\n\t\tif !utils.IsValidURL(p.WebHookURL) {\n\t\t\treturn fmt.Errorf(\"bad web hook URL: %s\", p.WebHookURL)\n\t\t}\n\t}\n\n\tif _, err := comUtils.CronParser().Parse(p.CronSpec); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\ntype policyWithScore struct {\n\tRawData []byte\n\tScore   int64\n}\n\n// Load all the policies from the backend storage.\nfunc Load(namespace string, conn redis.Conn) ([]*Policy, error) {\n\tbytes, err := redis.Values(conn.Do(\"ZRANGE\", rds.KeyPeriodicPolicy(namespace), 0, -1, \"WITHSCORES\"))","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/jobservice/period/policy_store.go#L46-L82","documentation":"Error \"bad web hook URL: %s\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/jobservice/period/policy_store.go:64 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"}