From b1cb1b91b459faf6c70c63e1bf2816c579475c6b Mon Sep 17 00:00:00 2001 From: FleetAdmiralJakob Date: Fri, 24 May 2024 21:21:44 +0200 Subject: [PATCH] chore: give more information on errors --- packages/api/src/routers/weather.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/api/src/routers/weather.ts b/packages/api/src/routers/weather.ts index 083d2a54..7fb9bfcf 100644 --- a/packages/api/src/routers/weather.ts +++ b/packages/api/src/routers/weather.ts @@ -266,9 +266,12 @@ export const weatherRouter = createTRPCRouter({ } } catch (error) { if (error instanceof z.ZodError) { - log.error(`Zod Errors in the ${errorMessage}`, error.issues); + log.error(`Zod Errors in the ${errorMessage}`, { + error: error.issues, + result, + }); } else { - log.error(`Else Error in the ${errorMessage}`, { error }); + log.error(`Else Error in the ${errorMessage}`, { error, result }); } } } else {