fix: incorrectly constructed responses for 204 status codes#52
fix: incorrectly constructed responses for 204 status codes#52SaltyAom merged 1 commit intoelysiajs:mainfrom
Conversation
WalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Possibly related issues
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
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 |
When returning
status(204)orstatus(204, null), the actual response gets constructed with an empty string instead ofnull. This throws an error in a variety of environments/runtimes (e.g. Vercel/Cloudflare). Instead we should construct the response passing innullas first param.Fixes elysiajs/elysia#1277 for the node adapter
Vercel Error
Cloudflare Error
I tested that this fixes the issue by deploying our app with a forked version of
@elysiajs/nodeSummary by CodeRabbit