diff --git a/src/routes/destinations/[id]/index.json.ts b/src/routes/destinations/[id]/index.json.ts index 3b878f9ca..e6fc9d075 100644 --- a/src/routes/destinations/[id]/index.json.ts +++ b/src/routes/destinations/[id]/index.json.ts @@ -12,7 +12,8 @@ export const get: RequestHandler = async (event) => { try { const destination = await db.getDestination({ id, teamId }); const settings = await db.listSettings(); - const state = await checkContainer(destination.engine, 'coolify-haproxy'); + const state = + destination?.engine && (await checkContainer(destination.engine, 'coolify-haproxy')); return { status: 200, body: {