Skip to content
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

VAT Info: Ensure field validation actually returns an error #100643

Open
jjchrisdiehl opened this issue Feb 28, 2025 · 2 comments
Open

VAT Info: Ensure field validation actually returns an error #100643

jjchrisdiehl opened this issue Feb 28, 2025 · 2 comments
Assignees
Labels
[Experiment] AI labels added [Feature] Checkout The checkout screen and process for purchases made on WordPress.com. [Feature Group] WPCOM Store & Purchases All things billing on WordPress.com. This includes the backend store, plans, and billing management. [Feature] Purchase Management Related to managing purchases such as subscriptions, plans, history, auto-renew, cancellation, etc. [Pri] TBD Review and assign an appropriate [Pri] label as soon as possible. [Status] Auto-allocated Triaged To be used when issues have been triaged. [Type] Bug When a feature is broken and / or not performing as intended

Comments

@jjchrisdiehl
Copy link
Contributor

As discussed with @sirbrillig, currently the updateError value in the VAT form, under Purchases > Billing History, doesn't return a usable error object to conditionally handle field errors.

We'll need to investigate this further and find out why we aren't receiving a usable error.

Related to #100515

@jjchrisdiehl jjchrisdiehl self-assigned this Feb 28, 2025
@jjchrisdiehl jjchrisdiehl added the [Type] Bug When a feature is broken and / or not performing as intended label Feb 28, 2025
@github-actions github-actions bot added [Pri] TBD Review and assign an appropriate [Pri] label as soon as possible. [Feature Group] WPCOM Store & Purchases All things billing on WordPress.com. This includes the backend store, plans, and billing management. [Feature] Checkout The checkout screen and process for purchases made on WordPress.com. [Feature] Purchase Management Related to managing purchases such as subscriptions, plans, history, auto-renew, cancellation, etc. labels Feb 28, 2025
Copy link

OpenAI suggested the following labels for this issue:

  • [Feature Group] WPCOM Store & Purchases: The issue pertains to the VAT form and billing history, which are directly related to purchases and billing on WordPress.com.
  • [Feature] Checkout: This label is relevant as it involves ensuring that errors related to the VAT form entry (which is part of the checkout process) are validated properly.
  • [Feature] Purchase Management: This is applicable because the issue addresses the handling of errors within the purchase process related to the VAT field.

@sirbrillig
Copy link
Member

Thanks for making an issue. I believe the issue is that useMutation requires you to specify when a request has an error, and wp.req.get() probably does not fail for validation failures. If we want the validation failure to set the error property it returns, I think we need to notice such a failure and explicitly set the error (probably by throwing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Experiment] AI labels added [Feature] Checkout The checkout screen and process for purchases made on WordPress.com. [Feature Group] WPCOM Store & Purchases All things billing on WordPress.com. This includes the backend store, plans, and billing management. [Feature] Purchase Management Related to managing purchases such as subscriptions, plans, history, auto-renew, cancellation, etc. [Pri] TBD Review and assign an appropriate [Pri] label as soon as possible. [Status] Auto-allocated Triaged To be used when issues have been triaged. [Type] Bug When a feature is broken and / or not performing as intended
Projects
Development

No branches or pull requests

4 participants