Improving Axios error logging
This commit is contained in:
parent
f90bd85ded
commit
8b21ba5383
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user