Dokploy/dokploy · error · TRPCError

NOT_FOUND

NOT_FOUND

Error message

Mariadb not found

What it means

Thrown by findMariadbById when the MariaDB lookup including nested deployments returns null — the mariadbId has no matching row.

Source

Thrown at packages/server/src/services/mariadb.ts:84

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

export const updateMariadbById = async (
	mariadbId: string,
	mariadbData: Partial<Mariadb>,
) => {
	const { appName, ...rest } = mariadbData;
	const result = await db
		.update(mariadb)
		.set({
			...rest,
		})
		.where(eq(mariadb.mariadbId, mariadbId))

View on GitHub (pinned to 546686ea35)

Solutions

  1. Verify the ID exists in the mariadb table
  2. Refetch the databases list and use a current ID
  3. Confirm the target Dokploy server/environment
Defensive patterns

Strategy: validation

Validate before calling

const dbs = await trpc.mariadb.list.query();
if (!dbs.some(d => d.mariadbId === id)) throw new Error('Unknown mariadbId');

Try / catch

try { await findMariadbById(id); } catch (e) { if (e.code === 'NOT_FOUND') return null; throw e; }

Prevention

When it happens

Trigger: Calling any mariadb router procedure that resolves by ID (findMariadbById backs the mariadb procedure) with a nonexistent or stale mariadbId.

Common situations: Database was deleted but the client/UI still references it, wrong server environment, or a copy-pasted ID from another project.

Related errors


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