fix(ses): reject malformed startDate/endDate in list_suppressed_destinations#5461
Conversation
…nations startDate/endDate were passed through new Date(...) with no validity check, so a malformed non-empty string became an Invalid Date and was still forwarded to AWS, surfacing as a generic 500. The contract now rejects unparseable date strings with a clear 400.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Each field keeps Reviewed by Cursor Bugbot for commit 0b31838. Configure here. |
Greptile SummaryAdds contract-level Zod
Confidence Score: 5/5Single-file validation tightening; no behavioral change for valid or absent dates, and malformed inputs are now correctly stopped at the schema layer. The change is minimal and targeted: two Zod field definitions gain a refine predicate using No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "fix(ses): reject malformed startDate/end..." | Re-trigger Greptile |
|
@greptile please re-review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0b31838. Configure here.
Summary
ses_list_suppressed_destinations'sstartDate/endDatewere passed throughnew Date(...)with no validity check; a malformed non-empty string became anInvalid Dateand was still forwarded to AWS, surfacing as a generic 500 instead of a clear 400Type of Change
Testing
bunx tsc --noEmit,bun run lint,bun run check:api-validationall passChecklist