Skip to content

Commit dac9fcf

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

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ define([
2424
messageContainer = messageContainer || globalMessageList;
2525

2626
if (response.status == 401) { //eslint-disable-line eqeqeq
27-
this.redirectTo(url.build('customer/account/login/'));
27+
error = {
28+
message: $t('You are not authorized to access this resource.')
29+
};
30+
messageContainer.addErrorMessage(error);
31+
setTimeout(() => {
32+
this.redirectTo(url.build('customer/account/login/'));
33+
}, 2000);
2834
} else {
2935
try {
3036
error = JSON.parse(response.responseText);

0 commit comments

Comments
 (0)