mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-03 07:26:00 +00:00
Fix error typing
This commit is contained in:
@@ -79,11 +79,12 @@ export const requestWithHCVaultGateway = async <T>(
|
|||||||
try {
|
try {
|
||||||
return await request.request(finalRequestConfig);
|
return await request.request(finalRequestConfig);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const axiosError = error as AxiosError;
|
if (error instanceof AxiosError) {
|
||||||
logger.error(
|
logger.error(
|
||||||
{ message: axiosError.message, data: axiosError.response?.data },
|
{ message: error.message, data: (error.response as undefined | { data: unknown })?.data },
|
||||||
"Error during HashiCorp Vault gateway request:"
|
"Error during HashiCorp Vault gateway request:"
|
||||||
);
|
);
|
||||||
|
}
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user