From 71d61c3a0b7e9c9a3c61111078ffde2dfe822b4f Mon Sep 17 00:00:00 2001 From: Shai Katz Date: Tue, 28 May 2024 13:52:55 +0300 Subject: [PATCH] Log returned errors from API --- src/services/api-service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/api-service.ts b/src/services/api-service.ts index 2c12139..1ed3103 100755 --- a/src/services/api-service.ts +++ b/src/services/api-service.ts @@ -56,6 +56,7 @@ const handleErrors = (error: any | Error | AxiosError): never => { const statusCode = error.response?.status; const title = errorAxiosResponse?.title; const message = errorAxiosResponse?.message || defaultErrorMessage; + logger.error(message); const traceId = errorAxiosResponse?.traceId?.toString(); printTraceIdIfPresent(traceId, statusCode); throw new HttpError(message, title, statusCode);