From 69f954bd967b0b6154a5f697ca8f25fee082b275 Mon Sep 17 00:00:00 2001 From: Mohamed Azarudeen Date: Tue, 24 Dec 2024 18:14:20 +0530 Subject: [PATCH] AC-11717 Dont throw console error for customer data if the request is blocked or cancelled --- .../Customer/view/frontend/web/js/customer-data.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js index 5b43b05279874..ab32a6d31ed90 100644 --- a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js +++ b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js @@ -1,6 +1,6 @@ /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. + * Copyright 2015 Adobe + * All Rights Reserved. */ /** @@ -95,7 +95,10 @@ define([ parameters['force_new_section_timestamp'] = forceNewSectionTimestamp; return $.getJSON(options.sectionLoadUrl, parameters).fail(function (jqXHR) { - throw new Error(jqXHR); + // don't throw error if the request is cancelled or blocked + if (jqXHR.status !== 0) { + throw new Error(jqXHR); + } }); } };