fix: handle undefined variable values

This commit is contained in:
Daniel Hougaard
2024-10-10 21:13:17 +04:00
parent 06f9a1484b
commit 19776df46c
2 changed files with 2 additions and 2 deletions
@@ -187,7 +187,7 @@ export const importDataIntoInfisicalFn = async ({
secretPath: "/", secretPath: "/",
secretName: secret.name, secretName: secret.name,
type: SecretType.Shared, type: SecretType.Shared,
secretValue: secret.value secretValue: secret.value || ""
}); });
if (!newSecret) { if (!newSecret) {
throw new BadRequestError({ message: `Failed to import secret: [name:${secret.name}] [id:${id}]` }); throw new BadRequestError({ message: `Failed to import secret: [name:${secret.name}] [id:${id}]` });
@@ -18,7 +18,7 @@ export type InfisicalImportData = {
name: string; name: string;
id: string; id: string;
environmentId: string; environmentId: string;
value: string; value?: string;
} }
>; >;
}; };