From 902fab7f82283e758f231648519ca8a88b36697a Mon Sep 17 00:00:00 2001 From: Jack Spagnoli Date: Fri, 20 Sep 2024 13:48:50 +0100 Subject: [PATCH] Fix: [AEA-0000] - Removes config from Axios Error (#219) ## Summary - Routine Change ### Details Removes config element from Axios error log to avoid private key leakage --- src/utils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils.ts b/src/utils.ts index 04ad0be..1c12ebf 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -17,6 +17,10 @@ export function handleErrorResponse(logger: Logger, response: AxiosResponse) { } export function handleCallError(logger: Logger, error: unknown) { + if (error["config"]){ + delete error["config"] + } + if (axios.isAxiosError(error)) { if (error.response) { logger.error("error in response from spine", {