Skip to content

Commit

Permalink
fix: Switch to next-axiom
Browse files Browse the repository at this point in the history
  • Loading branch information
FleetAdmiralJakob committed May 25, 2024
1 parent 40ff39a commit 10b9b39
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/api/src/routers/weather.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,20 +266,20 @@ export const weatherRouter = createTRPCRouter({
}
} catch (error) {
if (error instanceof z.ZodError) {
console.error(`Zod Errors in the ${errorMessage}`, {
log.error(`Zod Errors in the ${errorMessage}`, {
errorIssues: error.issues,
resultStatus: result.status,
resultValue: result.value,
});
} else {
console.error(`Else Error in the ${errorMessage}`, {
log.error(`Else Error in the ${errorMessage}`, {
error,
result,
});
}
}
} else {
console.log("result", result);
log.debug("result", result);
log.error(`${errorMessage} request failed`, {
status: result.status,
reason:
Expand Down Expand Up @@ -408,7 +408,7 @@ export const weatherRouter = createTRPCRouter({
// console.log("temperatureSumNight", temperatureSumNight);
}
} else {
console.log("undefined value temperature: ", j);
log.debug("undefined value temperature: ", { j });
}

if (hourlyAndDailyData.hourly.rain[j] !== undefined) {
Expand All @@ -417,7 +417,7 @@ export const weatherRouter = createTRPCRouter({
// console.log(hourlyAndDailyData.hourly.rain[j]!);
// console.log("rainSum", rainSum);
} else {
console.log("undefined value rain: ", j);
log.debug("undefined value rain: ", { j });
}

if (hourlyAndDailyData.hourly.showers[j] !== undefined) {
Expand All @@ -426,7 +426,7 @@ export const weatherRouter = createTRPCRouter({
// console.log(hourlyAndDailyData.hourly.showers[j]!);
// console.log("showersSum", showersSum);
} else {
console.log("undefined value showers: ", j);
log.debug("undefined value showers: ", { j });
}

if (hourlyAndDailyData.hourly.snowfall[j] !== undefined) {
Expand All @@ -435,7 +435,7 @@ export const weatherRouter = createTRPCRouter({
// console.log(hourlyAndDailyData.hourly.snowfall[j]!);
// console.log("snowfallSum", snowfallSum);
} else {
console.log("undefined value snowfall: ", j);
log.debug("undefined value snowfall: ", { j });
}

if (hourlyAndDailyData.hourly.cloudcover[j] !== undefined) {
Expand Down

0 comments on commit 10b9b39

Please sign in to comment.