From 4479711f2f6aa06251d864a830c1bd3959e98d04 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Wed, 5 Aug 2026 18:03:04 +0530 Subject: [PATCH] fix: resolve 4 bugs in devtrack --- e2e/auth.spec.ts | 3 ++- src/app/api/goals/[id]/route.ts | 2 +- src/app/api/metrics/activity/route.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/e2e/auth.spec.ts b/e2e/auth.spec.ts index c2bcfb4cf..aa3b9390a 100644 --- a/e2e/auth.spec.ts +++ b/e2e/auth.spec.ts @@ -74,4 +74,5 @@ test("[Auth E2E] landing page shows DevTrack feature section", async ({ // Features section or a recognised feature keyword must be present. const features = page.locator("#features"); await expect(features).toBeVisible(); -}); \ No newline at end of file +}); +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file 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/activity/route.ts b/src/app/api/metrics/activity/route.ts index 648696291..d41540543 100644 --- a/src/app/api/metrics/activity/route.ts +++ b/src/app/api/metrics/activity/route.ts @@ -167,7 +167,7 @@ export async function GET(req: NextRequest) { let limit = limitParam ? parseInt(limitParam, 10) : 10; let offset = offsetParam ? parseInt(offsetParam, 10) : 0; - if (isNaN(limit) || limit < 1) limit = 10; + if (Number.isNaN(limit) || limit < 1) limit = 10; if (limit > 100) limit = 100; if (isNaN(offset) || offset < 0) offset = 0;