fix: use Content-Type header in auth.ts#1995
Conversation
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughA single HTTP header name was corrected in the authentication utility from the invalid camelCase Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
@Nixxx19 Hi! Can you please add changeset? |
hi @AndreyHirsa, so sorry about that! i completely missed it. i've just added the changeset now. thanks for the heads-up! |
Fixes #1985
Summary
Fixes invalid HTTP header name in
auth.ts: replacesContentTypewith"Content-Type"so the whoami request sends a validContent-Typeheader.Changes
"Content-Type": "application/json"instead ofContentType: "application/json"inpackages/cli/src/cli/utils/auth.ts(line 25)observability.tsTesting
Business logic tests added:
grep "ContentType"returns nothing in auth.ts"Content-Type"HeadersthatContentTypeyieldsnullforget('Content-Type')and"Content-Type"worksVisuals
Verification (Content-Type fix):
Screenshot below: terminal output from the verification command showing:
"Content-Type": "application/json",ContentType→ null;"Content-Type"→ okChecklist
Summary by CodeRabbit
Bug Fixes
Chores