Commit Graph
4 Commits
Author SHA1 Message Date
Anik Dhabal BabuandGitHub fb59342de4 fix: Show the Stripe payment error message and change the status to 400 for charge card issues (#22463)
* fix: show stripe payment error message

* Update PaymentService.ts

* Update chargeCard.handler.ts

* Update chargeCard.handler.ts

* Update PaymentService.ts

* update

* update
2025-07-16 09:45:49 +00:00
Carina WollendorferGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>CarinaWolli
45698db0b4 fix: validate Round Robin host availability in handleNewBooking (#22253)
* fix: validate Round Robin host availability in handleNewBooking

- Add validation to ensure Round Robin events have at least one available non-fixed host
- Throw NoAvailableUsersFound error when no Round Robin hosts are available
- Add unit test to verify the fix works correctly
- Fixes issue where Round Robin events with fixed hosts could be booked without Round Robin hosts

Co-Authored-By: carina@cal.com <c.wollendorfer@me.com>

* test: fix host configuration in Round Robin test

Co-Authored-By: carina@cal.com <c.wollendorfer@me.com>

* test: improve Round Robin test to only make RR host busy

Co-Authored-By: carina@cal.com <c.wollendorfer@me.com>

* fix: correct Round Robin validation to only check when RR hosts assigned

Co-Authored-By: carina@cal.com <c.wollendorfer@me.com>

* fix: refine Round Robin validation to only apply when both fixed and RR hosts present

- Add fixedUserPool.length > 0 condition to validation
- Ensures validation only triggers for specific bug scenario: events with fixed hosts + RR hosts but no available RR hosts
- Prevents blocking normal Round Robin events that only have RR hosts
- Updates test description to reflect more precise validation logic

Co-Authored-By: carina@cal.com <c.wollendorfer@me.com>

* fix: simplify Round Robin validation to resolve E2E test failures

Remove overly restrictive fixedUserPool.length > 0 condition that was
blocking valid Round Robin booking scenarios in E2E tests. The validation
now only checks if Round Robin hosts are assigned but none are available,
which is the intended behavior for the bug fix.

Co-Authored-By: carina@cal.com <c.wollendorfer@me.com>

* fix: restore fixedUserPool condition to Round Robin validation

- Add back fixedUserPool.length > 0 condition to make validation specific to bug scenario
- Only triggers when Round Robin events have both fixed hosts AND Round Robin hosts but no available Round Robin hosts
- Prevents blocking normal Round Robin events that only have Round Robin hosts (like in organization settings E2E test)
- Updates test description to reflect more precise validation logic

Co-Authored-By: carina@cal.com <c.wollendorfer@me.com>

Co-Authored-By: carina@cal.com <c.wollendorfer@me.com>

* throw error if no RR user is available

* add tests

* fix comments

* revert change

* remove comments

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2025-07-11 16:47:21 +01:00
Benny JooandGitHub d50e1a0e15 feat: Leverage ErrorCode cases for correct error codes in server responses (#22023)
* Leverage ErrorCode cases for correct error codes in server responses

* better test

* fix
2025-06-25 13:18:01 -07:00
Benny JooandGitHub 4d45aa1564 perf: Do not import Stripe lib in getServerErrorFromUnknown (#19578)
* Do not import stripe lib in getServerErrorFromUnknown

* address comment

* remove comment

* add url

* keep the location

* remove space

* add unit test for getServerErrorFromUnknown

* improve
2025-02-27 15:22:23 +00:00