Skip to content

Commit 8fe079e

Browse files
committed
ACP2E-3541: "Something went wrong" error on checkout for inactive company
1 parent d3d375f commit 8fe079e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/code/Magento/Checkout/view/frontend/web/js/model/error-processor.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ define([
2828
message: $t('You are not authorized to access this resource.')
2929
};
3030
messageContainer.addErrorMessage(error);
31-
setTimeout(() => {
32-
this.redirectTo(url.build('customer/account/login/'));
33-
}, 2000);
31+
this.redirectTo(url.build('customer/account/login/'), 2000);
3432
} else {
3533
try {
3634
error = JSON.parse(response.responseText);
@@ -46,8 +44,10 @@ define([
4644
/**
4745
* Method to redirect by requested URL.
4846
*/
49-
redirectTo: function (redirectUrl) {
50-
window.location.replace(redirectUrl);
47+
redirectTo: function (redirectUrl, delay = 0) {
48+
setTimeout(() => {
49+
window.location.replace(redirectUrl);
50+
}, delay);
5151
}
5252
};
5353
});

0 commit comments

Comments
 (0)