Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix relays with same identity repalcing each other, throw error instead
x032205100c1b07862e
diff --git a/backend/src/ee/services/relay/relay-service.ts b/backend/src/ee/services/relay/relay-service.tsindex 749a3ca160..2cf090dff6 100644--- a/backend/src/ee/services/relay/relay-service.ts+++ b/backend/src/ee/services/relay/relay-service.ts@@ -996,7 +996,9 @@ export const relayServiceFactory = ({);if (existingRelay && (existingRelay.host !== host || existingRelay.name !== name)) {- return relayDAL.updateById(existingRelay.id, { host, name }, tx);+ throw new BadRequestError({+ message: `Machine identity already has an existing relay with the name "${existingRelay.name} and host "${existingRelay.host}". Delete the existing relay or use a different machine identity.`+ });}if (!existingRelay) {