Fix Awaiting of setAlertConfig in CI/CD Alerts Route - #9011
Conversation
|
@tamilr0727-ux is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
This pull request addresses an important issue by ensuring that the alert configuration is properly awaited, preventing potential unhandled promise rejections. It also includes regression tests to cover both successful and failed updates, which aligns with our previous decisions to enhance error resilience and exception handling in API routes. Thank you for your contribution, and I look forward to your updates! |
📦 Next.js Bundle Size Report (Gzipped Sizes)✨ No significant bundle size changes detected. 📊 Summary of Totals
|
|
🎉 Congratulations @tamilr0727-ux! Your PR has been successfully merged. 🚀 Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.
Keep building! 💻✨ |
Description
Fixes the
POSThandler inapp/api/cicd/alerts/route.tsby awaiting the asynchronoussetAlertConfig()operation before returning the API response.Changes
awaitto thesetAlertConfig()call.setAlertConfig()calls.Verification
✅
vitest runpasses successfully.✅ Alert configuration writes are awaited.
✅ Persistence failures are correctly propagated to the API error handler.
✅ No unhandled promise rejections occur from
setAlertConfig().Fixes #9009
Pillar
Visual Preview
Can Check in the Files Changed Section.
Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.