Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: simplify gateway not found error message

Saifd51f6f43d2cd
diff --git a/backend/src/ee/services/pam-domain/pam-domain-service.ts b/backend/src/ee/services/pam-domain/pam-domain-service.ts
index 63db99c336..54cdd76d86 100644
--- a/backend/src/ee/services/pam-domain/pam-domain-service.ts
+++ b/backend/src/ee/services/pam-domain/pam-domain-service.ts
@@ -119,7 +119,7 @@ export const pamDomainServiceFactory = ({
if (gatewayId) {
const gateway = await gatewayV2DAL.findOne({ id: gatewayId, orgId: actor.orgId });
if (!gateway) {
- throw new NotFoundError({ message: "Gateway not found or does not belong to this organization" });
+ throw new NotFoundError({ message: "Gateway not found" });
}
} else if (gatewayPoolId) {
await gatewayPoolService.resolveAttachableGatewayFromPool({
@@ -241,7 +241,7 @@ export const pamDomainServiceFactory = ({
if (gatewayId && gatewayId !== domain.gatewayId) {
const gateway = await gatewayV2DAL.findOne({ id: gatewayId, orgId: actor.orgId });
if (!gateway) {
- throw new NotFoundError({ message: "Gateway not found or does not belong to this organization" });
+ throw new NotFoundError({ message: "Gateway not found" });
}
} else if (gatewayPoolId && gatewayPoolId !== domain.gatewayPoolId) {
await gatewayPoolService.resolveAttachableGatewayFromPool({
diff --git a/backend/src/ee/services/pam-resource/pam-resource-service.ts b/backend/src/ee/services/pam-resource/pam-resource-service.ts
index 6162abd5fd..358804d160 100644
--- a/backend/src/ee/services/pam-resource/pam-resource-service.ts
+++ b/backend/src/ee/services/pam-resource/pam-resource-service.ts
@@ -215,7 +215,7 @@ export const pamResourceServiceFactory = ({
if (gatewayId) {
const gateway = await gatewayV2DAL.findOne({ id: gatewayId, orgId: actor.orgId });
if (!gateway) {
- throw new NotFoundError({ message: "Gateway not found or does not belong to this organization" });
+ throw new NotFoundError({ message: "Gateway not found" });
}
} else if (gatewayPoolId) {
await gatewayPoolService.resolveAttachableGatewayFromPool({
@@ -374,7 +374,7 @@ export const pamResourceServiceFactory = ({
if (gatewayId && gatewayId !== resource.gatewayId) {
const gateway = await gatewayV2DAL.findOne({ id: gatewayId, orgId: actor.orgId });
if (!gateway) {
- throw new NotFoundError({ message: "Gateway not found or does not belong to this organization" });
+ throw new NotFoundError({ message: "Gateway not found" });
}
} else if (gatewayPoolId && gatewayPoolId !== resource.gatewayPoolId) {
await gatewayPoolService.resolveAttachableGatewayFromPool({