{"record":{"id":"5e3af9c4719a06df","repo":"goharbor/harbor","slug":"too-many-request","errorCode":"TOO_MANY_REQUEST","errorMessage":"too many requests to upstream registry","messagePattern":"too many requests to upstream registry","errorType":"http","errorClass":"errors.Error","httpStatus":429,"severity":"error","filePath":"src/server/middleware/repoproxy/proxy.go","lineNumber":79,"sourceCode":"\tcontentLength                  = \"Content-Length\"\n\tcontentType                    = \"Content-Type\"\n\tdockerContentDigest            = \"Docker-Content-Digest\"\n\tetag                           = \"Etag\"\n\tensureTagInterval              = 10 * time.Second\n\tensureTagMaxRetry              = 60\n\tupstreamRegistryLimitOnProject = \"UPSTREAM_REGISTRY_LIMIT_ON_PROJECT\" // if UPSTREAM_REGISTRY_LIMIT_ON_PROJECT is true, the upstream registry connection is based on project level, by default it is artifact level\n\treferrerCacheTTL               = 7 * 24 * time.Hour\n\tlink                           = \"Link\"\n\txTotalCount                    = \"X-Total-Count\"\n)\n\nvar proxyHeaderNames = []string{\n\tcontentType,\n\tlink,\n\txTotalCount,\n}\n\nvar tooManyRequestsError = errors.New(\"too many requests to upstream registry\").WithCode(errors.RateLimitCode)\n\n// BlobGetMiddleware handle get blob request\nfunc BlobGetMiddleware() func(http.Handler) http.Handler {\n\treturn middleware.New(func(w http.ResponseWriter, r *http.Request, next http.Handler) {\n\t\tif err := handleBlob(w, r, next); err != nil {\n\t\t\thttpLib.SendError(w, err)\n\t\t}\n\t})\n}\n\nfunc handleBlob(w http.ResponseWriter, r *http.Request, next http.Handler) error {\n\tctx := r.Context()\n\tart, p, proxyCtl, err := preCheck(ctx, true)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// go will panic if the network connection is ever interrupted, despite recovering successfully","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/server/middleware/repoproxy/proxy.go#L61-L97","documentation":"Error \"too many requests to upstream registry\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/server/middleware/repoproxy/proxy.go:79 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"}