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; diff --git a/src/app/api/project-tutor/route.ts b/src/app/api/project-tutor/route.ts index a9d803b15..e71433c1a 100644 --- a/src/app/api/project-tutor/route.ts +++ b/src/app/api/project-tutor/route.ts @@ -163,4 +163,5 @@ Give a clear, concise answer focused on interview preparation. Keep it under 200 console.error("Project tutor error:", error); return NextResponse.json({ error: "Something went wrong" }, { status: 500 }); } -} \ 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/user/orgs/route.ts b/src/app/api/user/orgs/route.ts index 5bc5302c2..1444d1258 100644 --- a/src/app/api/user/orgs/route.ts +++ b/src/app/api/user/orgs/route.ts @@ -173,3 +173,5 @@ export async function POST(req: NextRequest) { return NextResponse.json({ error: "Internal server error" }, { status: 500 }); } } + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file