From 8b21ba5383044554a1b4b960c5d72d28d923d32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Fri, 3 Dec 2021 20:55:46 +0100 Subject: [PATCH] Improving Axios error logging --- front/src/Phaser/Reconnecting/ErrorScene.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/Phaser/Reconnecting/ErrorScene.ts b/front/src/Phaser/Reconnecting/ErrorScene.ts index d244d5f1..d91c3421 100644 --- a/front/src/Phaser/Reconnecting/ErrorScene.ts +++ b/front/src/Phaser/Reconnecting/ErrorScene.ts @@ -89,7 +89,7 @@ export class ErrorScene extends Phaser.Scene { } else if (Axios.isAxiosError(error) && error.response) { // Axios HTTP error // client received an error response (5xx, 4xx) - console.error("Axios error", error.toJSON()); + console.error("Axios error. Request:", error.request, " - Response: ", error.response); scene.start(ErrorSceneName, { title: "HTTP " + @@ -102,7 +102,7 @@ export class ErrorScene extends Phaser.Scene { } else if (Axios.isAxiosError(error)) { // Axios HTTP error // client never received a response, or request never left - console.error("Axios error", error.toJSON()); + console.error("Axios error. No full HTTP response received. Request:", error.request); scene.start(ErrorSceneName, { title: "Network error", subTitle: error.message,