mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Add error handling for initiate request
This commit is contained in:
parent
4449a071ec
commit
5e1aa7b244
1 changed files with 10 additions and 0 deletions
|
|
@ -270,6 +270,10 @@ export class CheckoutPageComponent extends Component {
|
|||
);
|
||||
|
||||
const isAmountTooLowError = isTransactionInitiateAmountTooLowError(initiateOrderError);
|
||||
const isBookingTimeNotAvailableError = isTransactionInitiateBookingTimeNotAvailableError(
|
||||
initiateOrderError
|
||||
);
|
||||
|
||||
let initiateOrderErrorMessage = null;
|
||||
|
||||
if (!listingNotFound && isAmountTooLowError) {
|
||||
|
|
@ -278,6 +282,12 @@ export class CheckoutPageComponent extends Component {
|
|||
<FormattedMessage id="CheckoutPage.initiateOrderAmountTooLow" />
|
||||
</p>
|
||||
);
|
||||
} else if (!listingNotFound && isBookingTimeNotAvailableError) {
|
||||
initiateOrderErrorMessage = (
|
||||
<p className={css.orderError}>
|
||||
<FormattedMessage id="CheckoutPage.bookingTimeNotAvailableMessage" />
|
||||
</p>
|
||||
);
|
||||
} else if (!listingNotFound && initiateOrderError) {
|
||||
initiateOrderErrorMessage = (
|
||||
<p className={css.orderError}>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue