-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
AC-11717 Dont throw console error for customer data if the request is… #39509
base: 2.4-develop
Are you sure you want to change the base?
AC-11717 Dont throw console error for customer data if the request is… #39509
Conversation
… blocked or cancelled
Hi @Mohamed-Asar. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
@magento run Static Tests, Functional Tests B2B |
@magento run Functional Tests B2B |
Description (*)
Don't throw error from customer-data.js if the request is cancelled or blocked by browser.
After clicking login button in checkout page, magneto calls customer load section two times with different sections
first request -> /customer/section/load/?sections=cart%2Ccaptcha%2Cmessages&force_new_section_timestamp=true&_=1735042507664
sections = cart, messages, captcha
second request -> /customer/section/load/?sections=cart%2Cdirectory-data%2Ccustomer%2Ccaptcha%2Ccompare-products%2Clast-ordered-items%2Cinstant-purchase%2CloggedAsCustomer%2Cpersistent%2Creview%2Cwishlist%2Crecently_viewed_product%2Crecently_compared_product%2Cproduct_data_storage%2Cpaypal-billing-agreement%2Cpaypal-buyer-country%2Cmessages&force_new_section_timestamp=false&_=1735042522007
second request also have cart, messages & captcha. I think Firefox is optimize network usage by canceling or blocking the first request if it determines that the subsequent request will provide a superset of the required data (cart, captcha, messages, and more). so its blocked/cancelled the first request and executes the second request.
I added a if condition to not throw any error if status code is zero.
Fixed Issues (if relevant)
Manual testing scenarios (*)
Note: Enable the below config to show password field for guest checkout, if the email is found
Questions or comments
Contribution checklist (*)