fix: validate pagination parameters in city API to prevent NaN values#409
fix: validate pagination parameters in city API to prevent NaN values#409vipul674 wants to merge 22 commits into
Conversation
Add isNaN check for 'from' and 'to' query parameters before they flow into the Supabase range call. Returns 400 error for invalid values instead of passing NaN to the database layer. Fixes Ixotic27#372
|
@vipul674 is attempting to deploy a commit to the ixotic27-8245's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
👋 Hey @vipul674, welcome to The Leetcode City! 🎉 Thanks for opening your first pull request — this is a big deal and we appreciate the effort! While you wait for a review, please double-check:
A maintainer will review your PR shortly. Hang tight! 🚀 |
|
@Ixotic27 PR is ready for review. ReportIssue
Changes
Fix Details
Files Changed
Verification
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@Ixotic27 All checks pass, please check and merge. |
|
🚨 Hey @vipul674, the CI Pipeline is failing on this PR and it has been marked as 🔍 What failed:
📋 Error Details (first 2):
Please fix the issues before this can be reviewed. Here's how: 1. Run checks locally before pushing: npm run lint # Run ESLint
npm run build # Verify production build passes2. Auto-fix common issues: npm run lint -- --fix # Auto-fix lint errors where possible3. Check the full failure log here: Once you push a fix and the CI passes, the |
What does this PR do?
Validates pagination parameters in
GET /api/cityto preventNaNvalues from flowing into the Supabase query layer.Added
isNaNchecks forfromandtoquery parameters afterparseInt. Returns a 400 error with a clear message if either value is invalid, instead of passingNaNto.range().Related issue
Fixes #372
Screenshots
No visual changes — this is an API validation fix.
Checklist
npm run lintpasses