From 19776df46ca42d2d0f66f2ee5ed6ca72923c7948 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Thu, 10 Oct 2024 21:13:17 +0400 Subject: [PATCH] fix: handle undefined variable values --- .../src/services/external-migration/external-migration-fns.ts | 2 +- .../src/services/external-migration/external-migration-types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/services/external-migration/external-migration-fns.ts b/backend/src/services/external-migration/external-migration-fns.ts index 0e3cc576f..3af44c368 100644 --- a/backend/src/services/external-migration/external-migration-fns.ts +++ b/backend/src/services/external-migration/external-migration-fns.ts @@ -187,7 +187,7 @@ export const importDataIntoInfisicalFn = async ({ secretPath: "/", secretName: secret.name, type: SecretType.Shared, - secretValue: secret.value + secretValue: secret.value || "" }); if (!newSecret) { throw new BadRequestError({ message: `Failed to import secret: [name:${secret.name}] [id:${id}]` }); diff --git a/backend/src/services/external-migration/external-migration-types.ts b/backend/src/services/external-migration/external-migration-types.ts index cb58ad9a2..4139b0cf5 100644 --- a/backend/src/services/external-migration/external-migration-types.ts +++ b/backend/src/services/external-migration/external-migration-types.ts @@ -18,7 +18,7 @@ export type InfisicalImportData = { name: string; id: string; environmentId: string; - value: string; + value?: string; } >; };