Repository navigation
test(backend): fix pre-existing Express 5 integration test breakage - #681
Conversation
The requireAuth middleware was using .then()/.catch() without properly returning, causing connection resets in Express 5. Converted to async/await with try/catch to properly handle async middleware execution and error propagation. This fixes 24 failing integration test suites that are now all passing (329/331 tests, 2 skipped).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 50 minutes and 25 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ 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 |
|
#681) The requireAuth middleware was using .then()/.catch() without properly returning, causing connection resets in Express 5. Converted to async/await with try/catch to properly handle async middleware execution and error propagation. This fixes 24 failing integration test suites that are now all passing (329/331 tests, 2 skipped).



Summary
Fixes all 24 integration test suites that were broken under Express 5. The root cause was the
requireAuthmiddleware using promise chaining (.then()/.catch()) without properly returning, causing connection resets.Changes
requireAuthmiddleware from promise chaining to async/await with try/catchTest Results
Before: 1 failed, 23 passed (100% pass rate on 24 suites)
After: 24 passed, 24 total (100% pass rate)
This unblocks coverage on PRs #676, #678, #679, #680.