{"record":{"id":"79ad43c404ece50c","repo":"goharbor/harbor","slug":"set-api-key-in-s-is-invalid","errorCode":null,"errorMessage":"set api key in %s is invalid","messagePattern":"set api key in (.+?) is invalid","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/reg/adapter/quay/auth/apikey.go","lineNumber":58,"sourceCode":"\t\tkey:   key,\n\t\tvalue: value,\n\t\tin:    in,\n\t}\n}\n\n// Modify implements modifier.Modifier\nfunc (a *apiKeyAuthorizer) Modify(r *http.Request) error {\n\tswitch a.in {\n\tcase APIKeyInHeader:\n\t\tr.Header.Set(a.key, a.value)\n\t\treturn nil\n\tcase APIKeyInQuery:\n\t\tquery := r.URL.Query()\n\t\tquery.Add(a.key, a.value)\n\t\tr.URL.RawQuery = query.Encode()\n\t\treturn nil\n\t}\n\treturn fmt.Errorf(\"set api key in %s is invalid\", a.in)\n}\n","sourceCodeStart":40,"sourceCodeEnd":60,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/reg/adapter/quay/auth/apikey.go#L40-L60","documentation":"Error \"set api key in %s is invalid\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/reg/adapter/quay/auth/apikey.go:58 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"}