{"record":{"id":"5d19aef4569a9f6b","repo":"cloudreve/cloudreve","slug":"entity-data-does-not-exist","errorCode":null,"errorMessage":"Entity data does not exist.","messagePattern":"Entity data does not exist\\.","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"pkg/filemanager/manager/entitysource/entitysource.go","lineNumber":283,"sourceCode":"\nfunc (f *entitySource) LocalPath(ctx context.Context) string {\n\treturn f.handler.LocalPath(ctx, f.e.Source())\n}\n\nfunc (f *entitySource) Serve(w http.ResponseWriter, r *http.Request, opts ...EntitySourceOption) {\n\tif len(opts) > 0 {\n\t\t// Clear cache when options are applied as they might affect URL generation\n\t\tf.clearUrlCache()\n\t}\n\tfor _, opt := range opts {\n\t\topt.Apply(f.o)\n\t}\n\n\tif f.IsLocal() {\n\t\t// For local files, validate file existence by resetting rsc\n\t\tif err := f.resetRequest(); err != nil {\n\t\t\tf.l.Warning(\"Failed to serve local entity %q: %s\", err, f.e.Source())\n\t\t\thttp.Error(w, \"Entity data does not exist.\", http.StatusNotFound)\n\t\t\treturn\n\t\t}\n\t}\n\n\tetag := \"\\\"\" + hashid.EncodeEntityID(f.hasher, f.e.ID()) + \"\\\"\"\n\tw.Header().Set(\"Etag\", \"\\\"\"+hashid.EncodeEntityID(f.hasher, f.e.ID())+\"\\\"\")\n\n\tif f.o.IsDownload {\n\t\t// Properly handle non-ASCII characters in filename according to RFC 6266\n\t\tdisplayName := f.o.DisplayName\n\t\tasciiFilename := toASCIISafeFilename(displayName)\n\n\t\t// RFC 6266 compliant filename* encoding\n\t\tencodedFilename := url.QueryEscape(displayName)\n\n\t\tif displayName == asciiFilename {\n\t\t\t// Filename contains only ASCII characters, use simple form\n\t\t\tw.Header().Set(\"Content-Disposition\", fmt.Sprintf(\"attachment; filename=\\\"%s\\\"\", displayName))","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/cloudreve/cloudreve/blob/20c95ad73f3a8bcb72887fea91ff31ab24fa1011/pkg/filemanager/manager/entitysource/entitysource.go#L265-L301","documentation":"Error \"Entity data does not exist.\" thrown in cloudreve/cloudreve.","triggerScenarios":"Thrown at pkg/filemanager/manager/entitysource/entitysource.go:283 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":"20c95ad73f3a8bcb72887fea91ff31ab24fa1011","analyzedAt":"2026-08-16T01:42:55.403Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}