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:
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:
|
||||
|
||||
Reference in new issue
Block a user