Skip to content

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

fix(secret-sync): strip keySchema from response instead of hard-failing for unsupported destinations

Igor Correa28b48cfe7bfa
diff --git a/backend/src/services/secret-sync/secret-sync-schemas.ts b/backend/src/services/secret-sync/secret-sync-schemas.ts
index 2a7ee3b846..977b362587 100644
--- a/backend/src/services/secret-sync/secret-sync-schemas.ts
+++ b/backend/src/services/secret-sync/secret-sync-schemas.ts
@@ -57,7 +57,9 @@ const BaseSyncOptionsSchema = <T extends AnyZodObject | undefined = undefined>({
)
.describe(SecretSyncs.SYNC_OPTIONS(destination).keySchema)
: z
- .undefined({ message: `Key schema is not supported for ${syncName} syncs` })
+ .string()
+ .optional()
+ .transform(() => undefined)
.describe(`Not supported for ${syncName} syncs.`),
disableSecretDeletion: supportsDisableSecretDeletion
? z.boolean().optional().describe(SecretSyncs.SYNC_OPTIONS(destination).disableSecretDeletion)