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 832461e commit 40ff39a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/api/src/routers/weather.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,9 @@ export const weatherRouter = createTRPCRouter({
} catch (error) {
if (error instanceof z.ZodError) {
console.error(`Zod Errors in the ${errorMessage}`, {
error: error.issues,
result,
errorIssues: error.issues,
resultStatus: result.status,
resultValue: result.value,
});
} else {
console.error(`Else Error in the ${errorMessage}`, {
Expand Down

0 comments on commit 40ff39a

Please sign in to comment.