Skip to content

Conversation

animesh1987
Copy link
Contributor

@animesh1987 animesh1987 commented Sep 25, 2025

What/Why?

Catch empty cart error message and display a valid modal.

At times if the cart only has one product and that product is made purchasable throughout checkout journey. The cart is removed on server side, we need to catch the error returned from server and display the message to shopper.

Rollout/Rollback

  • revert this PR

Testing

  • CI
  • Screencast

Place order

Screen.Recording.2025-09-25.at.11.01.06.pm.mov

Continue as guest

Screen.Recording.2025-09-25.at.11.02.00.pm.mov

Continue from shipping

Screen.Recording.2025-09-25.at.11.02.32.pm.mov

@animesh1987 animesh1987 marked this pull request as ready for review September 29, 2025 04:39
@animesh1987 animesh1987 requested a review from a team as a code owner September 29, 2025 04:39
import { type TranslationData } from '@bigcommerce/checkout-sdk';

export function mapCheckoutComponentErrorMessage(
error: any,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we actively avoid using any in production code, I noticed we have 5 existing usage of error: any, maybe we can refactor all of them in another PR next quarter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants