Files
cal.diy/packages/app-store
5bb2bc3ba4 fix: resolve JSON parsing error in Stripe subscription endpoint (#23892)
* fix: resolve JSON parsing error in Stripe subscription endpoint

- Fix 'Unexpected end of JSON input' error during premium username upgrade
- Replace res.status(404).end() with proper JSON response
- Add descriptive error message for missing userId or intentUsername parameters
- Ensure consistent JSON response format across all error paths

Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>

* fix: add proper session handling to Stripe subscription endpoint

- Import getServerSession from @calcom/features/auth/lib/getServerSession
- Use getServerSession({ req }) to properly populate user session
- Fix session validation that was causing 'Unexpected end of JSON input' error
- Ensure subscription endpoint handles sessions consistently with other Cal.com API endpoints

Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-09-17 15:03:16 +00:00
..
2025-02-04 20:45:44 +00:00
2024-09-21 02:10:12 +00:00
2024-09-21 02:10:12 +00:00
2025-02-27 03:58:17 +00:00
2025-01-10 14:47:18 +00:00
2025-04-16 14:27:53 +00:00
2024-09-21 02:10:12 +00:00
2025-02-19 18:20:47 +05:30
2024-09-21 02:10:12 +00:00
2025-09-09 19:05:17 +05:30
2025-09-14 17:52:38 +00:00