-
Notifications
You must be signed in to change notification settings - Fork 21
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
Show a general error message when the phone number verification request is failed #1999
Conversation
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.
Thanks @eason9487 for addressing this. I left a minor comment about the "TODO" label. LGTM 👍
js/src/data/actions.js
Outdated
// TODO: Remove the handling of 'backendError' and add the case for 'badRequest'. | ||
// | ||
// Currently, 'badRequest' won't be presented but maybe someday it can be handled. | ||
// Ref: | ||
// - https://github.com/woocommerce/google-listings-and-ads/issues/1101 | ||
// - https://github.com/woocommerce/google-listings-and-ads/issues/1998 |
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.
I'm unsure whether this should be marked as a "TODO" or considered pending since we lack knowledge about potential changes in the API response down the line. One option could be to omit the "TODO" label and simply leave the comments as they are.
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.
Removing only TODO might make the semantics deviate somewhat from what this error handling was supposed to do. I rephrased it in cbda283 to only describe the "why" but didn't specify "what" to do.
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.
Thanks @eason9487 for the adjustment, I think the comment is clearer now.
…cationCode action. Address: #1999 (comment)
Changes proposed in this Pull Request:
This PR solves a task of 📌 Clarify API error messages in #1993
Closes #1101
This PR fixes the blank error message when requesting verification with an invalid phone number. Please also refer to #1998 for why this PR can only show a general error message.
Screenshots:
Detailed test instructions:
+31
and111111111
.Additional details:
I didn't add tests in this PR as I hope to add more comprehensive tests for the
VerifyPhoneNumberContent
component before the end of the project if there is still time. Added a follow-up item to 📌 Add tests.Changelog entry