goharbor/harbor · error · badRequestError
10013
10013
Error message
missing job parameters
What it means
The AUDIT_LOGS_DATA_MASKING job (GDPR username masking in audit logs) rejects a nil parameter map in Validate (src/jobservice/job/impl/gdpr/audit_logs_data_masking.go:50) with code 10013. parseParams then requires the 'username' key (UserNameParam) to be present and a string — so only a completely absent params object (JSON null) triggers this specific message; an empty map instead fails with 'param username not found'.
Source
Thrown at src/jobservice/job/impl/gdpr/audit_logs_data_masking.go:50
userManager user.Manager
}
func (a AuditLogsDataMasking) MaxFails() uint {
return 3
}
func (a AuditLogsDataMasking) MaxCurrency() uint {
return 1
}
func (a AuditLogsDataMasking) ShouldRetry() bool {
return true
}
func (a AuditLogsDataMasking) Validate(params job.Parameters) error {
if params == nil {
// Params are required
return errors.New("missing job parameters")
}
_, err := a.parseParams(params)
return err
}
func (a *AuditLogsDataMasking) init() {
if a.manager == nil {
a.manager = audit.New()
}
if a.userManager == nil {
a.userManager = user.New()
}
if a.extManager == nil {
a.extManager = auditext.Mgr
}
}
func (a AuditLogsDataMasking) Run(ctx job.Context, params job.Parameters) error {View on GitHub (pinned to 7b2fd08cc5)
Solutions
- Pass a non-nil params map containing the 'username' key (see parseParams at audit_logs_data_masking.go:84-94)
- Ensure the value is a string — a non-string type is rejected with a separate error
- Validate the params map on the client before enqueueing
Example fix
// before
params := job.Parameters(nil)
// after
params := job.Parameters{
"username": "user@example.com",
} Defensive patterns
Strategy: validation
Validate before calling
if params == nil {
return fmt.Errorf("AUDIT_LOGS_DATA_MASKING requires params")
}
if _, ok := params["username"].(string); !ok {
return fmt.Errorf("params must contain string 'username'")
} Type guard
func hasUsernameParam(params job.Parameters) bool {
v, ok := params["username"]
return ok
} Prevention
- Always construct the params map explicitly instead of passing a possibly-nil variable
- Check UserNameParam ('username') presence and type before enqueueing
- Cover the nil-params path in job client tests
When it happens
Trigger: Submitting or scheduling the AUDIT_LOGS_DATA_MASKING job with params omitted/null in the launch request rather than an object.
Common situations: Custom admin tooling launching the masking job without building the params object; webhook-driven flows that construct params conditionally and pass nil when empty; GDPR purge integrations after upgrade.
Related errors
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/007a7bbc9c95281b.
Report an issue: GitHub.