From 1952acc0570a8979c6462c4a0ceaf1e2bc5dbba4 Mon Sep 17 00:00:00 2001 From: Joshua Oosthuizen Date: Tue, 17 Nov 2026 19:06:06 +0200 Subject: [PATCH] Registration: linking a Hub install never blocks registering Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Ls1vMdni7EfytGYqQTprME --- backend/src/routes/installApi.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/routes/installApi.js b/backend/src/routes/installApi.js index 68f09f3..2bb54e6 100644 --- a/backend/src/routes/installApi.js +++ b/backend/src/routes/installApi.js @@ -154,7 +154,11 @@ router.post('/installs/register', registerLimiter, async (req, res) => { await prisma.installEvent.create({ data: { installId: install.id, type: 'registered', level: 'info', message: `${licence.install ? 'Re-registered' : 'Registered'} from ${url} (version ${install.version || '?'})`, resolvedAt: new Date() } }); // A site the Hub installed (Servers → New install) is linked to its registration, so its // update and closing banners reach it (found in the VM test: they never did). - await prisma.deployment.updateMany({ where: { licenceId: licence.id, installId: null }, data: { installId: install.id } }).catch(() => {}); + try { + await prisma.deployment.updateMany({ where: { licenceId: licence.id, installId: null }, data: { installId: install.id } }); + } catch (e) { + console.warn('[hub] linking the deployment to its install failed:', e?.message || e); + } res.status(201).json({ installId: install.id,