-
Notifications
You must be signed in to change notification settings - Fork 120
[Local catalog] Handle variation ids in dotcom errors #16430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
- Add `data` to `DotcomError.unknown` case - Parse `data` and handle variation ID when present during POS checkout - Update other uses of it to use the new signature
|
|
|
I'm having troubles logging into a jurassic ninja site with the PR loaded ( logged at WOOMOB-1850 ), would you mind to invite me to one of your sites where this PR is active? |
|
@iamgabrielma You already have an account on https://woocommerce-tester.mystagingwebsite.com/ which has the fix 👍 |
iamgabrielma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well! 🚀

Description
This PR updates our handling of missing variations at POS checkout to work correctly with DotcomError as it already did with NetworkError.
DotcomError is returned when your requests are going through the WPCom tunnel, which was recently updated to return the data object in these errors.
This PR updates our DotcomError enum to make that data available, similar to how it is with NetworkError, and use it in the same way in the POSOrderService when checking out.
The PR's a bit big because I opted to make the error data available everywhere, so we can use it better in future.
Test Steps
Screenshots
variation.errors.with.dotcom.error.mp4
RELEASE-NOTES.txtif necessary.