Dokploy/dokploy · error · TRPCError

NOT_FOUND

NOT_FOUND

Error message

MySql not found

What it means

findMySqlById fetches a mysql service with its server, mounts, deployments relations; NOT_FOUND is thrown when the query returns nothing for the mysqlId. This is the standard lookup behind the mysql router procedures.

Source

Thrown at packages/server/src/services/mysql.ts:82

				},
			},
			mounts: true,
			server: true,
			backups: {
				with: {
					destination: {
						columns: {
							accessKey: false,
							secretAccessKey: false,
						},
					},
					deployments: true,
				},
			},
		},
	});
	if (!result) {
		throw new TRPCError({
			code: "NOT_FOUND",
			message: "MySql not found",
		});
	}
	return result;
};

export const updateMySqlById = async (
	mysqlId: string,
	mysqlData: Partial<MySql>,
) => {
	const { appName, ...rest } = mysqlData;
	const result = await db
		.update(mysql)
		.set({
			...rest,
		})
		.where(eq(mysql.mysqlId, mysqlId))

View on GitHub (pinned to 546686ea35)

Solutions

  1. List mysql services to confirm the ID is current
  2. If deleted, recreate the service or update the referencing resource
  3. Ensure you are authenticated into the workspace that owns the service
Defensive patterns

Strategy: try-catch

Validate before calling

const all = await listMySql();
const ok = all.some(m => m.mysqlId === id);

Try / catch

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

Prevention

When it happens

Trigger: Requesting a mysql service by an ID that does not exist, was deleted, or is filtered out by the scoped where conditions (organization/application).

Common situations: Stale ID from an old bookmark/deep link, deleted service, cross-workspace access attempt.

Related errors


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