HeyPuter/puter · error · HttpError

not_found

not_found

Error message

Not Found

What it means

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.

Source

Thrown at src/backend/controllers/webdav/WebDAVController.ts:358

                'Accept-Ranges': 'bytes',
                'Content-Type': 'text/plain; charset=utf-8',
                'Cache-Control': 'no-cache',
            })
            .send('');
    }

    // -- GET / HEAD --------------------------------------------------

    async #get(
        req: Request,
        res: Response,
        actor: Actor,
        davPath: string,
        headOnly: boolean,
    ): Promise<void> {
        const entry = await this.stores.fsEntry.getEntryByPath(davPath);
        if (!entry)
            throw new HttpError(404, 'Not Found', { legacyCode: 'not_found' });
        if (entry.isDir)
            throw new HttpError(400, 'Cannot GET a directory', {
                legacyCode: 'bad_request',
            });

        await this.#assertRead(actor, davPath);

        const etag = `"${entry.uuid}-${Math.floor(entry.modified ?? entry.created ?? 0)}"`;
        const size = entry.size ?? 0;

        res.set({
            'Accept-Ranges': 'bytes',
            'Content-Length': String(size),
            'Last-Modified': new Date(
                entry.modified ?? entry.created ?? 0,
            ).toUTCString(),
            ETag: etag,
        });

View on GitHub (pinned to 908ec23eda)

Solutions

  1. Verify the file exists via the GUI or /fs/stat before the WebDAV GET.
  2. Confirm you authenticated as the account that owns the file.
  3. Check the path for typos, trailing slashes, or encoding issues.
  4. Handle 404 in the WebDAV client as 'file gone' rather than retrying.
Defensive patterns

Strategy: try-catch

Validate before calling

// Probe existence before GET
const stat = await fetch(fsBase + '/stat?path=' + encodeURIComponent(p));
if (stat.status === 404) handleMissing();

Try / catch

try { await davGet(path); }
catch (e) { if (e.status === 404) { invalidateCache(path); handleMissing(); } else throw e; }

Prevention

When it happens

Trigger: 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.

Common situations: 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).

Related errors


AI-assisted analysis of HeyPuter/puter@908ec23eda (2026-08-12). Data as JSON: /api/errors/3e28f1c50af4bf21. Report an issue: GitHub.