diff --git a/src/app/api/goals/[id]/route.ts b/src/app/api/goals/[id]/route.ts index 4a0fdf485..1b4642dc9 100644 --- a/src/app/api/goals/[id]/route.ts +++ b/src/app/api/goals/[id]/route.ts @@ -171,7 +171,7 @@ export async function PATCH( unit: updatedGoal.unit, recurrence: updatedGoal.recurrence, completedAt: new Date().toISOString(), - }).catch(() => {}); + }).catch( => console.error()); } return Response.json({ goal: updatedGoal }); diff --git a/src/app/api/metrics/repos/route.ts b/src/app/api/metrics/repos/route.ts index 11ef12f67..3d7759da1 100644 --- a/src/app/api/metrics/repos/route.ts +++ b/src/app/api/metrics/repos/route.ts @@ -238,7 +238,7 @@ export async function GET(req: NextRequest) { const daysParam = req.nextUrl.searchParams.get("days"); const parsedDays = daysParam ? parseInt(daysParam, 10) : NaN; // Clamp days between 1 and 365 — GitHub Commit Search supports up to ~1 year lookback. - const days = isNaN(parsedDays) ? 30 : Math.max(1, Math.min(365, parsedDays)); + const days = Number.isNaN(parsedDays) ? 30 : Math.max(1, Math.min(365, parsedDays)); const accountId = req.nextUrl.searchParams.get("accountId"); const bypass = isMetricsCacheBypassed(req);