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: change error message to handle undefined reagion when sts is defined
adilsonfaeda84315a8
diff --git a/backend/package-lock.json b/backend/package-lock.jsonindex 18428a251d..5731b2da85 100644--- a/backend/package-lock.json+++ b/backend/package-lock.json@@ -6725,9 +6725,6 @@"win32"]},- "node_modules/@infisical/quic/node_modules/@infisical/quic-linux-arm": {- "optional": true- },"node_modules/@inquirer/external-editor": {"version": "1.0.3","resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz",diff --git a/backend/src/services/app-connection/aws/aws-connection-fns.ts b/backend/src/services/app-connection/aws/aws-connection-fns.tsindex 161a02fb4c..41b2d5f866 100644--- a/backend/src/services/app-connection/aws/aws-connection-fns.ts+++ b/backend/src/services/app-connection/aws/aws-connection-fns.ts@@ -220,7 +220,13 @@ export const awsSyncPreSaveTransformDestinationConfig: TPreSaveTransformDestinatconst region = destinationConfig.region as string | undefined;- if (region && region !== stsRegion) {+ if (!region) {+ throw new BadRequestError({+ message: `Secret sync region is required when the AWS connection uses a regional STS endpoint. Set the region in the sync destination config to match the connection's STS endpoint.`+ });+ }++ if (region !== stsRegion) {throw new BadRequestError({message: `Secret sync region "${region}" must match the AWS connection's STS endpoint region from the app connection. Update the sync region or the connection's STS endpoint.`});