Validate pagination parameters in campaign leads endpoint - #639
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesPagination Parameter Validation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @chesta02 👋 LeadOrbit Bot here! Thanks for opening a pull request and contributing to the project. Before your PR is reviewed, please make sure you've: We noticed that you haven't starred the repository yet. If you enjoy the project and would like to support it, please consider giving it a ⭐. It helps the project grow and motivates the maintainers. Once you've starred the repository, your PR will continue through the review process. Thanks for contributing! 🚀 |
Summary
This PR fixes Issue #55 by validating pagination query parameters in the campaign leads endpoint.
Changes
Added validation for
limitandoffsetquery parameters.Returns HTTP 400 when either parameter is not a valid integer.
Clamps
limitto a maximum of 200.Prevents negative
offsetvalues by defaulting them to 0.Testing
Verified valid integer values work correctly.
Verified invalid values return HTTP 400.
Verified negative offsets are normalized to 0.
Verified large limits are capped at 200.
Summary by CodeRabbit