From 0f2d902d2ef12070b6da5d757c8ed44d5ba99a0a Mon Sep 17 00:00:00 2001 From: Adrian Calinescu Date: Sat, 14 Nov 2020 19:59:11 +0200 Subject: [PATCH] Fix verbose logging when we get JSON back Which i guess was like 99% of the time? :) --- src/ApiClient.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ApiClient.ts b/src/ApiClient.ts index 7f9c456..b20b85a 100644 --- a/src/ApiClient.ts +++ b/src/ApiClient.ts @@ -34,7 +34,9 @@ export class ApiClient { return true; } logger.warn(`Got HTTP code ${err?.response?.status ?? undefined}. Retrying request...`); - logger.verbose(`Here is the error message: \n '${err.response?.data}`); + logger.verbose('Here is the error message: '); + console.dir(err.response?.data); + logger.verbose('We called this URL: ' + err.response?.config.baseURL + err.response?.config.url); const shouldRetry: boolean = retryCodes.includes(err?.response?.status ?? 0);