mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-11 00:28:49 +00:00
misc: addressed greptile
This commit is contained in:
@@ -62,7 +62,6 @@ export const KubernetesProvider = ({ gatewayService }: TKubernetesProviderDTO):
|
|||||||
const serviceAccountGetCallback = async (host: string, port: number) => {
|
const serviceAccountGetCallback = async (host: string, port: number) => {
|
||||||
const baseUrl = port ? `${host}:${port}` : host;
|
const baseUrl = port ? `${host}:${port}` : host;
|
||||||
|
|
||||||
try {
|
|
||||||
await axios.get(
|
await axios.get(
|
||||||
`${baseUrl}/api/v1/namespaces/${providerInputs.namespace}/serviceaccounts/${providerInputs.serviceAccountName}`,
|
`${baseUrl}/api/v1/namespaces/${providerInputs.namespace}/serviceaccounts/${providerInputs.serviceAccountName}`,
|
||||||
{
|
{
|
||||||
@@ -78,15 +77,6 @@ export const KubernetesProvider = ({ gatewayService }: TKubernetesProviderDTO):
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return true;
|
|
||||||
} catch (err) {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
||||||
if (axios.isAxiosError(err) && err.response?.data.message) {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
||||||
throw new Error(`Failed to validate connection: ${err.response.data.message}`);
|
|
||||||
}
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const url = new URL(providerInputs.url);
|
const url = new URL(providerInputs.url);
|
||||||
|
|||||||
Reference in New Issue
Block a user