From a709a716d494da4da3da568fe71d5137b7f9b0a4 Mon Sep 17 00:00:00 2001 From: Eric Doughty-Papassideris Date: Wed, 5 Jun 2024 23:36:25 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Show=20inne?= =?UTF-8?q?r=20errors=20of=20AggregateError=20instances=20(#515)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tdrive/backend/node/src/services/applications-api/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tdrive/backend/node/src/services/applications-api/index.ts b/tdrive/backend/node/src/services/applications-api/index.ts index b0d5a735..411b9230 100644 --- a/tdrive/backend/node/src/services/applications-api/index.ts +++ b/tdrive/backend/node/src/services/applications-api/index.ts @@ -27,7 +27,7 @@ export default class ApplicationsApiService extends TdriveService { if (domain && prefix) { try { fastify.all("/" + prefix + "/*", async (req, rep) => { - logger.info("Proxying", req.method, req.url, "to", domain); + logger.info(`Proxying ${req.method} ${req.url} to ${domain}`); try { const response = await axios.request({ url: domain + req.url, @@ -55,7 +55,8 @@ export default class ApplicationsApiService extends TdriveService { await rep.send(response.data); } catch (err) { - logger.error(`${err}`); + logger.error(err); + if (err.errors) err.errors.forEach(err => logger.error(err)); rep.raw.statusCode = 500; rep.raw.end(JSON.stringify({ error: err.message })); }