Skip to content

Commit de879cf

Browse files
waleedlatif1claude
andcommitted
fix(evernote): clamp maxNotes to Evernote's 250 limit
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0e16b74 commit de879cf

File tree

1 file changed

+3
-1
lines changed
  • apps/sim/app/api/tools/evernote/search-notes

1 file changed

+3
-1
lines changed

apps/sim/app/api/tools/evernote/search-notes/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ export async function POST(request: NextRequest) {
2424
)
2525
}
2626

27+
const clampedMaxNotes = Math.min(Math.max(Number(maxNotes) || 25, 1), 250)
28+
2729
const result = await searchNotes(
2830
apiKey,
2931
query,
3032
notebookGuid || undefined,
3133
Number(offset),
32-
Number(maxNotes)
34+
clampedMaxNotes
3335
)
3436

3537
return NextResponse.json({

0 commit comments

Comments
 (0)