diff --git a/admin-app/src/utils.ts b/admin-app/src/utils.ts index 954525bd..97e03b64 100644 --- a/admin-app/src/utils.ts +++ b/admin-app/src/utils.ts @@ -19,6 +19,7 @@ export function handleError(err: Error | AxiosError | string) { store.commit("error", err); } else if (isAxiosError(err) && err.response?.data?.message) { store.commit("error", err.response.data.message); + console.error(err.response.data); } else if (isError(err)) { store.commit("error", err.message); } else { diff --git a/api-node/app/app.ts b/api-node/app/app.ts index 756e962c..87f620c5 100644 --- a/api-node/app/app.ts +++ b/api-node/app/app.ts @@ -69,7 +69,7 @@ async function listen(port = env.listen.port.api) { ctx.body = { message: err.message }; } else { ctx.status = 500; - ctx.body = { message: "Internal error" }; + ctx.body = { message: "Internal error: " + err.message, stack: err.stack }; } try { diff --git a/game-server/app/app.ts b/game-server/app/app.ts index 01557b9b..56cf1755 100644 --- a/game-server/app/app.ts +++ b/game-server/app/app.ts @@ -58,7 +58,7 @@ app.use(async (ctx, next) => { ctx.body = { message: err.message }; } else { ctx.status = 500; - ctx.body = { message: "Internal error" }; + ctx.body = { message: "Internal error: " + err.message, stack: err.stack }; } await ApiError.create({ diff --git a/webapp-vue/src/utils.ts b/webapp-vue/src/utils.ts index b5416665..2c358068 100644 --- a/webapp-vue/src/utils.ts +++ b/webapp-vue/src/utils.ts @@ -20,6 +20,7 @@ export function handleError(err: Error | AxiosError | string) { store.commit("error", err); } else if (isAxiosError(err) && err.response?.data?.message) { store.commit("error", err.response.data.message); + console.error(err.response.data); } else if (isError(err)) { store.commit("error", err.message); } else {