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
This commit is contained in:
Anik Dhabal Babu authored and GitHub committed 2025-07-16 09:45:49 +00:00
1 parent a84e8987cb
commit fb59342de4
6 files changed
+48 -13

No files matched your search

@@ -112,6 +112,7 @@ function getStatusCode(cause: Error | ErrorWithCode): number {
case ErrorCode.BookerLimitExceeded:
case ErrorCode.BookerLimitExceededReschedule:
case ErrorCode.EventTypeNoHosts:
case ErrorCode.ChargeCardFailure:
return 400;
// 409 Conflict
case ErrorCode.NoAvailableUsersFound:
@@ -122,7 +123,6 @@ function getStatusCode(cause: Error | ErrorWithCode): number {
case ErrorCode.NotEnoughAvailableSeats:
case ErrorCode.BookingConflict:
case ErrorCode.PaymentCreationFailure:
case ErrorCode.ChargeCardFailure:
return 409;
// 404 Not Found
case ErrorCode.EventTypeNotFound: