mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 22:28:47 +00:00
refactor: improve error handling for gateway connection in LDAP functions
This commit is contained in:
@@ -124,7 +124,10 @@ export const executeWithPotentialGateway = async <T>(
|
||||
targetPort: port
|
||||
});
|
||||
|
||||
if (platformConnectionDetails) {
|
||||
if (!platformConnectionDetails) {
|
||||
throw new BadRequestError({ message: "Unable to connect to gateway, no platform connection details found" });
|
||||
}
|
||||
|
||||
return withGatewayV2Proxy(
|
||||
async (proxyPort) => {
|
||||
const proxyUrl = constructLdapUrl(protocol, "localhost", proxyPort);
|
||||
@@ -161,7 +164,6 @@ export const executeWithPotentialGateway = async <T>(
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Non-gateway path - calls getLdapConnectionClient which has validation
|
||||
const client = await getLdapConnectionClient(credentials);
|
||||
|
||||
Reference in New Issue
Block a user