goharbor/harbor · error · errors.Error
TOO_MANY_REQUEST
TOO_MANY_REQUEST
Error message
too many requests to upstream registry
What it means
Error "too many requests to upstream registry" thrown in goharbor/harbor.
Source
Thrown at src/server/middleware/repoproxy/proxy.go:79
contentLength = "Content-Length"
contentType = "Content-Type"
dockerContentDigest = "Docker-Content-Digest"
etag = "Etag"
ensureTagInterval = 10 * time.Second
ensureTagMaxRetry = 60
upstreamRegistryLimitOnProject = "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
referrerCacheTTL = 7 * 24 * time.Hour
link = "Link"
xTotalCount = "X-Total-Count"
)
var proxyHeaderNames = []string{
contentType,
link,
xTotalCount,
}
var tooManyRequestsError = errors.New("too many requests to upstream registry").WithCode(errors.RateLimitCode)
// BlobGetMiddleware handle get blob request
func BlobGetMiddleware() func(http.Handler) http.Handler {
return middleware.New(func(w http.ResponseWriter, r *http.Request, next http.Handler) {
if err := handleBlob(w, r, next); err != nil {
httpLib.SendError(w, err)
}
})
}
func handleBlob(w http.ResponseWriter, r *http.Request, next http.Handler) error {
ctx := r.Context()
art, p, proxyCtl, err := preCheck(ctx, true)
if err != nil {
return err
}
// go will panic if the network connection is ever interrupted, despite recovering successfullyView on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/server/middleware/repoproxy/proxy.go:79 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- HTTP status errors: handling 4xx and 5xx responses — how to handle 4xx and 5xx responses properly.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/5e3af9c4719a06df.
Report an issue: GitHub.