{"record":{"id":"3e28f1c50af4bf21","repo":"HeyPuter/puter","slug":"not-found-3e28f1","errorCode":"not_found","errorMessage":"Not Found","messagePattern":"Not Found","errorType":"http","errorClass":"HttpError","httpStatus":404,"severity":"error","filePath":"src/backend/controllers/webdav/WebDAVController.ts","lineNumber":358,"sourceCode":"                'Accept-Ranges': 'bytes',\n                'Content-Type': 'text/plain; charset=utf-8',\n                'Cache-Control': 'no-cache',\n            })\n            .send('');\n    }\n\n    // -- GET / HEAD --------------------------------------------------\n\n    async #get(\n        req: Request,\n        res: Response,\n        actor: Actor,\n        davPath: string,\n        headOnly: boolean,\n    ): Promise<void> {\n        const entry = await this.stores.fsEntry.getEntryByPath(davPath);\n        if (!entry)\n            throw new HttpError(404, 'Not Found', { legacyCode: 'not_found' });\n        if (entry.isDir)\n            throw new HttpError(400, 'Cannot GET a directory', {\n                legacyCode: 'bad_request',\n            });\n\n        await this.#assertRead(actor, davPath);\n\n        const etag = `\"${entry.uuid}-${Math.floor(entry.modified ?? entry.created ?? 0)}\"`;\n        const size = entry.size ?? 0;\n\n        res.set({\n            'Accept-Ranges': 'bytes',\n            'Content-Length': String(size),\n            'Last-Modified': new Date(\n                entry.modified ?? entry.created ?? 0,\n            ).toUTCString(),\n            ETag: etag,\n        });","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/HeyPuter/puter/blob/908ec23eda38526170322c3edf71ba45ecb1ca95/src/backend/controllers/webdav/WebDAVController.ts#L340-L376","documentation":"Returned (HTTP 404, legacy code not_found) by WebDAVController.#get (the GET/HEAD handler on the dav.* subdomain). It fires when stores.fsEntry.getEntryByPath(davPath) returns no entry — i.e. the requested path does not exist in the user's filesystem. Read permission (#assertRead) is checked only after existence, so this is purely an existence check.","triggerScenarios":"A WebDAV GET or HEAD for a path that does not exist (deleted, never created, typo, wrong account). Mounting a WebDAV client against the wrong root so paths resolve to nothing.","commonSituations":"Cached client requesting a file that was deleted elsewhere; wrong username/credentials resolving to an empty filesystem; path encoding issues (e.g. unencoded spaces/unicode).","solutions":["Verify the file exists via the GUI or /fs/stat before the WebDAV GET.","Confirm you authenticated as the account that owns the file.","Check the path for typos, trailing slashes, or encoding issues.","Handle 404 in the WebDAV client as 'file gone' rather than retrying."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Probe existence before GET\nconst stat = await fetch(fsBase + '/stat?path=' + encodeURIComponent(p));\nif (stat.status === 404) handleMissing();","typeGuard":null,"tryCatchPattern":"try { await davGet(path); }\ncatch (e) { if (e.status === 404) { invalidateCache(path); handleMissing(); } else throw e; }","preventionTips":["Invalidate cached paths on MOVE/DELETE.","Confirm credentials resolve to the owning account.","URL-encode paths with spaces or unicode."],"tags":["webdav","filesystem","not-found","api"],"backgroundTag":null,"analyzedSha":"908ec23eda38526170322c3edf71ba45ecb1ca95","analyzedAt":"2026-08-12T20:53:15.911Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}