Dokploy/dokploy · error · TRPCError

NOT_FOUND

NOT_FOUND

Error message

Mongo not found

What it means

Thrown by findMongoById when the MongoDB lookup (including nested deployments) returns null for the given mongoId.

Source

Thrown at packages/server/src/services/mongo.ts:79

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

export const updateMongoById = async (
	mongoId: string,
	mongoData: Partial<Mongo>,
) => {
	const { appName, ...rest } = mongoData;
	const result = await db
		.update(mongo)
		.set({
			...rest,
		})
		.where(eq(mongo.mongoId, mongoId))

View on GitHub (pinned to 546686ea35)

Solutions

  1. Confirm the mongoId exists in the mongo table
  2. Refetch the mongo list from the API and use a fresh ID
  3. Verify the Dokploy server URL and credentials
Defensive patterns

Strategy: validation

Validate before calling

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

Try / catch

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

Prevention

When it happens

Trigger: Calling the mongo router's by-ID procedures with a mongoId that doesn't exist — deleted database, wrong environment, or stale client-side ID.

Common situations: UI cache referencing a deleted mongo deployment, wrong server URL/API key pointing at another environment.

Related errors


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