goharbor/harbor · error · badRequestError
10013
10013
Error message
missing parameter of slack job
What it means
The Slack notification job's Validate (src/jobservice/job/impl/notification/slack_job.go:66) rejects a nil params map with code 10013. Subsequent checks require string entries 'payload' (the Slack message body) and 'address' (the webhook URL); this specific message means the whole params map was absent, not merely one field.
Source
Thrown at src/jobservice/job/impl/notification/slack_job.go:66
}
return result
}
// MaxCurrency is implementation of same method in Interface.
func (sj *SlackJob) MaxCurrency() uint {
return 1
}
// ShouldRetry ...
func (sj *SlackJob) ShouldRetry() bool {
return true
}
// Validate implements the interface in job/Interface
func (sj *SlackJob) Validate(params job.Parameters) error {
if params == nil {
// Params are required
return errors.New("missing parameter of slack job")
}
payload, ok := params["payload"]
if !ok {
return errors.Errorf("missing job parameter 'payload'")
}
_, ok = payload.(string)
if !ok {
return errors.Errorf("malformed job parameter 'payload', expecting string but got %s", reflect.TypeOf(payload).String())
}
address, ok := params["address"]
if !ok {
return errors.Errorf("missing job parameter 'address'")
}
_, ok = address.(string)
if !ok {
return errors.Errorf("malformed job parameter 'address', expecting string but got %s", reflect.TypeOf(address).String())View on GitHub (pinned to 7b2fd08cc5)
Solutions
- Ensure the notification flow constructs params with 'payload' (string) and 'address' (string webhook URL)
- Check the Slack webhook policy target settings in the project configuration
- Re-trigger the notification after fixing the payload builder
Example fix
// before
params := job.Parameters(nil)
// after
params := job.Parameters{
"payload": "registry notification: artifact pushed",
"address": "https://hooks.slack.com/services/T000/B000/XXXX",
} Defensive patterns
Strategy: validation
Validate before calling
if params == nil {
return fmt.Errorf("slack job requires params")
}
for _, k := range []string{"payload", "address"} {
if _, ok := params[k].(string); !ok {
return fmt.Errorf("slack job requires string param %q", k)
}
} Type guard
func isSlackParamsValid(params job.Parameters) bool {
p, ok1 := params["payload"].(string)
a, ok2 := params["address"].(string)
return ok1 && ok2 && p != "" && a != ""
} Prevention
- Build Slack params (payload + address) in one helper used by every notification path
- Type-assert params as strings before submitting — the job rejects non-strings
- Test the webhook policy end-to-end after Harbor upgrades
When it happens
Trigger: A Slack webhook policy firing with no params constructed — e.g. a custom notification handler or replayed event that failed to build payload/address; direct job submission with params null.
Common situations: Webhook policy misconfiguration; Harbor upgrades changing how the notification payload builder assembles params; testing the notification job with empty parameters.
Related errors
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/d3be6e217e0adf9d.
Report an issue: GitHub.