{"record":{"id":"c127b57d29638b15","repo":"goharbor/harbor","slug":"denied","errorCode":"DENIED","errorMessage":"The system is in read only mode. Any modification is prohibited.","messagePattern":"The system is in read only mode\\. Any modification is prohibited\\.","errorType":"http","errorClass":"errors.Error","httpStatus":403,"severity":"error","filePath":"src/server/middleware/readonly/readonly.go","lineNumber":72,"sourceCode":"func Middleware(skippers ...middleware.Skipper) func(http.Handler) http.Handler {\n\treturn MiddlewareWithConfig(DefaultConfig, skippers...)\n}\n\n// MiddlewareWithConfig middleware reject request when harbor set to readonly with config\nfunc MiddlewareWithConfig(config Config, skippers ...middleware.Skipper) func(http.Handler) http.Handler {\n\tif len(skippers) == 0 {\n\t\tskippers = []middleware.Skipper{safeMethodSkipper}\n\t} else {\n\t\tskippers = append(skippers, []middleware.Skipper{safeMethodSkipper}...)\n\t}\n\n\tif config.ReadOnly == nil {\n\t\tconfig.ReadOnly = DefaultConfig.ReadOnly\n\t}\n\n\treturn middleware.New(func(w http.ResponseWriter, r *http.Request, next http.Handler) {\n\t\tif config.ReadOnly(r) {\n\t\t\tpkgE := errors.New(nil).WithCode(errors.DENIED).WithMessage(\"The system is in read only mode. Any modification is prohibited.\")\n\t\t\tlib_http.SendError(w, pkgE)\n\t\t\treturn\n\t\t}\n\n\t\tnext.ServeHTTP(w, r)\n\t}, skippers...)\n}\n","sourceCodeStart":54,"sourceCodeEnd":80,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/server/middleware/readonly/readonly.go#L54-L80","documentation":"Error \"The system is in read only mode. Any modification is prohibited.\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/server/middleware/readonly/readonly.go:72 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"}