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,