Dokploy/dokploy · error · TRPCError

NOT_FOUND

NOT_FOUND

Error message

Mount not found

What it means

findMountById queries the mounts table (with joined app/deployments relations) and throws NOT_FOUND when no row matches the given mountId. It is the canonical lookup helper used by the mount router, so any request for a deleted or nonexistent mount surfaces here.

Source

Thrown at packages/server/src/services/mount.ts:136

			},
		},
	} as const;

	const mount = await db.query.mounts.findFirst({
		where: eq(mounts.mountId, mountId),
		with: {
			application: serviceWith,
			compose: serviceWith,
			libsql: serviceWith,
			mariadb: serviceWith,
			mongo: serviceWith,
			mysql: serviceWith,
			postgres: serviceWith,
			redis: serviceWith,
		},
	});
	if (!mount) {
		throw new TRPCError({
			code: "NOT_FOUND",
			message: "Mount not found",
		});
	}
	return mount;
};

export const findMountOrganizationId = async (mountId: string) => {
	const mount = await findMountById(mountId);

	if (mount.application) {
		return mount.application.environment.project.organizationId;
	}
	if (mount.compose) {
		return mount.compose.environment.project.organizationId;
	}
	if (mount.libsql) {
		return mount.libsql.environment.project.organizationId;

View on GitHub (pinned to 546686ea35)

Solutions

  1. Verify the mountId exists: select from mounts where mountId = ...
  2. Refresh the mount list in the UI and retry with the current ID
  3. If the mount was deleted intentionally, remove the dangling reference from your config/scripts
Defensive patterns

Strategy: try-catch

Validate before calling

const mounts = await listMounts(appId);
if (!mounts.some(m => m.mountId === id)) skip();

Try / catch

try { return await findMountById(id); } catch (e) { if (e instanceof TRPCError && e.code === "NOT_FOUND") return null; throw e; }

Prevention

When it happens

Trigger: Calling the mount query/procedure with a mountId that does not exist, was deleted, or belongs to a different workspace/organization scope filtered in the where clause.

Common situations: Stale mountId cached in the UI after another team member deleted the mount; copy-pasting an ID with a typo; race between delete and read.

Related errors


AI-assisted analysis of Dokploy/dokploy@546686ea35 (2026-08-27). Data as JSON: /api/errors/06aab7f444f5821b. Report an issue: GitHub.