-
Notifications
You must be signed in to change notification settings - Fork 687
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
Added code to display error message from grapqhl response in form #4346
Conversation
LogERROR ON TASK: unitTests
ERROR ON TASK: validateQueries
|
@@ -24,6 +24,7 @@ export const CREATE_ACCOUNT = gql` | |||
# eslint-disable-next-line @graphql-eslint/require-id-when-available | |||
customer { | |||
is_confirmed |
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.
Cannot query field "is_confirmed" on type "Customer".
I have to above error after is_confirmed has added.
Description
This PR contains the fix for customer login flow when require email confirmation is enabled.
Appropriate error message response from the graphql on customer creation will be shown in the form
This change requires few changes in Magento backend code.
Backend PR:
https://github.com/magento-commerce/magento2-pwa/pull/61
Closes #PWA-3367
https://jira.corp.adobe.com/browse/PWA-3367
Acceptance
Verification Stakeholders
Specification
Verification Steps
Step 1: Enable customer email confirmation from Magento Admin panel -> Stores -> Customer -> Customer Configuration -> Create New Account Options -> Require Emails Confirmation -> Yes and save the config
Step 2: In PWA store view add a product to cart and the go to Checkout page -> Sign In-> Create an account or Header -> Sign in -> Create an account
Step 3: Enter all the necessary details for the new customer account (Email should not exist already in the website)
Step 4: Click create an account button
Current result:
General error is thrown instead of more relevant error
(Error: An error has occurred. Please check the input and try again.)
Fix result:
Actual message from Magento graphql will be shown.
(Your account is created, You must confirm your account. Please check your email for the confirmation link.)
Screenshots / Screen Captures (if appropriate)
Breaking Changes (if any)
Checklist