Skip to content

Commit

Permalink
chore: give more information on errors
Browse files Browse the repository at this point in the history
  • Loading branch information
FleetAdmiralJakob committed May 24, 2024
1 parent b1cb1b9 commit 832461e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/api/src/routers/weather.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,15 @@ export const weatherRouter = createTRPCRouter({
}
} catch (error) {
if (error instanceof z.ZodError) {
log.error(`Zod Errors in the ${errorMessage}`, {
console.error(`Zod Errors in the ${errorMessage}`, {
error: error.issues,
result,
});
} else {
log.error(`Else Error in the ${errorMessage}`, { error, result });
console.error(`Else Error in the ${errorMessage}`, {
error,
result,
});
}
}
} else {
Expand Down

0 comments on commit 832461e

Please sign in to comment.