@bigcommerce/checkout-sdk / CheckoutStoreErrorSelector
Responsible for getting the error of any asynchronous checkout action, if there is any.
This object has a set of getters that would return an error if an action is not executed successfully. For example, if you are unable to submit an order, you can use this object to retrieve the reason for the failure.
- getApplyCouponError
- getApplyGiftCertificateError
- getApplyStoreCreditError
- getContinueAsGuestError
- getCreateConsignmentsError
- getCreateCustomerAccountError
- getCreateCustomerAddressError
- getDeleteConsignmentError
- getDeleteInstrumentError
- getError
- getFinalizeOrderError
- getInitializeCustomerError
- getInitializePaymentError
- getInitializeShippingError
- getLoadBillingCountriesError
- getLoadCartError
- getLoadCheckoutError
- getLoadConfigError
- getLoadExtensionsError
- getLoadInstrumentsError
- getLoadOrderError
- getLoadPaymentMethodError
- getLoadPaymentMethodsError
- getLoadShippingCountriesError
- getLoadShippingOptionsError
- getPickupOptionsError
- getRemoveCouponError
- getRemoveGiftCertificateError
- getSelectShippingOptionError
- getSignInEmailError
- getSignInError
- getSignOutError
- getSubmitOrderError
- getUpdateBillingAddressError
- getUpdateCheckoutError
- getUpdateConsignmentError
- getUpdateShippingAddressError
- getUpdateSubscriptionsError
▸ getApplyCouponError(): undefined
| RequestError
<any
>
Returns an error if unable to apply a coupon code.
undefined
| RequestError
<any
>
The error object if unable to apply, otherwise undefined.
▸ getApplyGiftCertificateError(): undefined
| RequestError
<any
>
Returns an error if unable to apply a gift certificate.
undefined
| RequestError
<any
>
The error object if unable to apply, otherwise undefined.
▸ getApplyStoreCreditError(): undefined
| RequestError
<any
>
Returns an error if unable to apply store credit.
undefined
| RequestError
<any
>
The error object if unable to apply, otherwise undefined.
▸ getContinueAsGuestError(): undefined
| Error
Returns an error if unable to continue as guest.
The call could fail in scenarios where guest checkout is not allowed, for example, when existing accounts are required to sign-in.
In the background, this call tries to set the billing address email using the Storefront API. You could access the Storefront API response status code using getContinueAsGuestError
error selector.
console.log(state.errors.getContinueAsGuestError());
console.log(state.errors.getContinueAsGuestError().status);
For more information about status codes, check Checkout Storefront API - Add Checkout Billing Address.
undefined
| Error
The error object if unable to continue, otherwise undefined.
▸ getCreateConsignmentsError(): undefined
| Error
Returns an error if unable to create consignments.
undefined
| Error
The error object if unable to create, otherwise undefined.
▸ getCreateCustomerAccountError(): undefined
| Error
Returns an error if unable to create customer account.
undefined
| Error
The error object if unable to create account, otherwise undefined.
▸ getCreateCustomerAddressError(): undefined
| Error
Returns an error if unable to create customer address.
undefined
| Error
The error object if unable to create address, otherwise undefined.
▸ getDeleteConsignmentError(consignmentId?
): undefined
| Error
Returns an error if unable to delete a consignment.
A consignment ID should be provided when checking for an error for a specific consignment, otherwise it will check for all available consignments.
Name | Type | Description |
---|---|---|
consignmentId? |
string |
The identifier of the consignment to be checked. |
undefined
| Error
The error object if unable to delete, otherwise undefined.
▸ getDeleteInstrumentError(instrumentId?
): undefined
| Error
Returns an error if unable to delete a payment instrument.
Name | Type | Description |
---|---|---|
instrumentId? |
string |
The identifier of the payment instrument to delete. |
undefined
| Error
The error object if unable to delete, otherwise undefined.
▸ getError(): undefined
| Error
undefined
| Error
▸ getFinalizeOrderError(): undefined
| Error
Returns an error if unable to finalize the current order.
undefined
| Error
The error object if unable to finalize, otherwise undefined.
▸ getInitializeCustomerError(methodId?
): undefined
| Error
Returns an error if unable to initialize the customer step of a checkout process.
Name | Type | Description |
---|---|---|
methodId? |
string |
The identifer of the initialization method to execute. |
undefined
| Error
The error object if unable to initialize, otherwise undefined.
▸ getInitializePaymentError(methodId?
): undefined
| Error
Returns an error if unable to initialize a specific payment method.
Name | Type | Description |
---|---|---|
methodId? |
string |
The identifier of the payment method to initialize. |
undefined
| Error
The error object if unable to initialize, otherwise undefined.
▸ getInitializeShippingError(methodId?
): undefined
| Error
Returns an error if unable to initialize the shipping step of a checkout process.
Name | Type | Description |
---|---|---|
methodId? |
string |
The identifer of the initialization method to execute. |
undefined
| Error
The error object if unable to initialize, otherwise undefined.
▸ getLoadBillingCountriesError(): undefined
| Error
Returns an error if unable to load billing countries.
undefined
| Error
The error object if unable to load, otherwise undefined.
▸ getLoadCartError(): undefined
| Error
Returns an error if unable to load the current cart.
undefined
| Error
The error object if unable to load, otherwise undefined.
▸ getLoadCheckoutError(): undefined
| Error
Returns an error if unable to load the current checkout.
undefined
| Error
The error object if unable to load, otherwise undefined.
▸ getLoadConfigError(): undefined
| Error
Returns an error if unable to load the checkout configuration of a store.
undefined
| Error
The error object if unable to load, otherwise undefined.
▸ getLoadExtensionsError(): undefined
| Error
Returns an error if unable to fetch extensions.
alpha
undefined
| Error
The error object if unable to fetch extensions, otherwise undefined.
▸ getLoadInstrumentsError(): undefined
| Error
Returns an error if unable to load payment instruments.
undefined
| Error
The error object if unable to load, otherwise undefined.
▸ getLoadOrderError(): undefined
| Error
Returns an error if unable to load the current order.
undefined
| Error
The error object if unable to load, otherwise undefined.
▸ getLoadPaymentMethodError(methodId?
): undefined
| Error
Returns an error if unable to load a specific payment method.
Name | Type | Description |
---|---|---|
methodId? |
string |
The identifier of the payment method to load. |
undefined
| Error
The error object if unable to load, otherwise undefined.
▸ getLoadPaymentMethodsError(): undefined
| Error
Returns an error if unable to load payment methods.
undefined
| Error
The error object if unable to load, otherwise undefined.
▸ getLoadShippingCountriesError(): undefined
| Error
Returns an error if unable to load shipping countries.
undefined
| Error
The error object if unable to load, otherwise undefined.
▸ getLoadShippingOptionsError(): undefined
| Error
Returns an error if unable to load shipping options.
undefined
| Error
The error object if unable to load, otherwise undefined.
▸ getPickupOptionsError(): undefined
| Error
Returns an error if unable to fetch pickup options.
undefined
| Error
The error object if unable to fetch pickup options, otherwise undefined.
▸ getRemoveCouponError(): undefined
| RequestError
<any
>
Returns an error if unable to remove a coupon code.
undefined
| RequestError
<any
>
The error object if unable to remove, otherwise undefined.
▸ getRemoveGiftCertificateError(): undefined
| RequestError
<any
>
Returns an error if unable to remove a gift certificate.
undefined
| RequestError
<any
>
The error object if unable to remove, otherwise undefined.
▸ getSelectShippingOptionError(consignmentId?
): undefined
| Error
Returns an error if unable to select a shipping option.
A consignment ID should be provided when checking for an error for a specific consignment, otherwise it will check for all available consignments.
Name | Type | Description |
---|---|---|
consignmentId? |
string |
The identifier of the consignment to be checked. |
undefined
| Error
The error object if unable to select, otherwise undefined.
▸ getSignInEmailError(): undefined
| Error
Returns an error if unable to send sign-in email.
undefined
| Error
The error object if unable to send email, otherwise undefined.
▸ getSignInError(): undefined
| Error
Returns an error if unable to sign in.
undefined
| Error
The error object if unable to sign in, otherwise undefined.
▸ getSignOutError(): undefined
| Error
Returns an error if unable to sign out.
undefined
| Error
The error object if unable to sign out, otherwise undefined.
▸ getSubmitOrderError(): undefined
| Error
| CartChangedError
| CartConsistencyError
Returns an error if unable to submit the current order.
undefined
| Error
| CartChangedError
| CartConsistencyError
The error object if unable to submit, otherwise undefined.
▸ getUpdateBillingAddressError(): undefined
| Error
Returns an error if unable to update billing address.
undefined
| Error
The error object if unable to update, otherwise undefined.
▸ getUpdateCheckoutError(): undefined
| Error
Returns an error if unable to update the current checkout.
undefined
| Error
The error object if unable to update, otherwise undefined.
▸ getUpdateConsignmentError(consignmentId?
): undefined
| Error
Returns an error if unable to update a consignment.
A consignment ID should be provided when checking for an error for a specific consignment, otherwise it will check for all available consignments.
Name | Type | Description |
---|---|---|
consignmentId? |
string |
The identifier of the consignment to be checked. |
undefined
| Error
The error object if unable to update, otherwise undefined.
▸ getUpdateShippingAddressError(): undefined
| Error
Returns an error if unable to update shipping address.
undefined
| Error
The error object if unable to update, otherwise undefined.
▸ getUpdateSubscriptionsError(): undefined
| Error
Returns an error if unable to update subscriptions.
undefined
| Error
The error object if unable to update, otherwise undefined.