Skip to content

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

targetnamespace to check nullable

adilsondaa0f35c176c
diff --git a/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts b/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts
index 62dbebf73d..59f7164b81 100644
--- a/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts
+++ b/backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts
@@ -697,7 +697,7 @@ export const listHCVaultMounts = async (
// if the error is 301 and the namespace is root or /, try to fetch mounts without the namespace header
if (
((error instanceof AxiosError && error.response?.status === 301) || isGateway301Error(error)) &&
- (targetNamespace === "/" || targetNamespace === "root" || targetNamespace === undefined || targetNamespace === "")
+ (targetNamespace === "/" || targetNamespace === "root" || !targetNamespace)
) {
({ data } = await fetchMounts());
} else {