{"record":{"id":"feba6987e53620b8","repo":"goharbor/harbor","slug":"internal-server-error","errorCode":null,"errorMessage":"Internal Server Error","messagePattern":"Internal Server Error","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"src/registryctl/handlers/handler.go","lineNumber":64,"sourceCode":"\ntype authHandler struct {\n\tauthenticator auth.AuthenticationHandler\n\thandler       http.Handler\n\tinsecureAPIs  map[string]bool\n}\n\nfunc newAuthHandler(authenticator auth.AuthenticationHandler, handler http.Handler, insecureAPIs map[string]bool) http.Handler {\n\treturn &authHandler{\n\t\tauthenticator: authenticator,\n\t\thandler:       handler,\n\t\tinsecureAPIs:  insecureAPIs,\n\t}\n}\n\nfunc (a *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\tif a.authenticator == nil {\n\t\tlog.Errorf(\"No authenticator found in registry controller.\")\n\t\thttp.Error(w, http.StatusText(http.StatusInternalServerError),\n\t\t\thttp.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tif a.insecureAPIs != nil && a.insecureAPIs[r.URL.Path] {\n\t\tif a.handler != nil {\n\t\t\ta.handler.ServeHTTP(w, r)\n\t\t}\n\t\treturn\n\t}\n\n\terr := a.authenticator.AuthorizeRequest(r)\n\tif err != nil {\n\t\tlog.Errorf(\"failed to authenticate request: %v\", err)\n\t\thttp.Error(w, http.StatusText(http.StatusUnauthorized),\n\t\t\thttp.StatusUnauthorized)\n\t\treturn\n\t}","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/registryctl/handlers/handler.go#L46-L82","documentation":"Error \"Internal Server Error\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/registryctl/handlers/handler.go:64 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"}