Skip to content

Commit 7845493

Browse files
committed
MAGETWO-95501: Checkout page does not provide shipping methods option on cloud env
1 parent 3b1fb97 commit 7845493

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
*/
99
define([
1010
'mage/url',
11-
'Magento_Ui/js/model/messageList'
12-
], function (url, globalMessageList) {
11+
'Magento_Ui/js/model/messageList',
12+
'mage/translate'
13+
], function (url, globalMessageList, $t) {
1314
'use strict';
1415

1516
return {
@@ -25,7 +26,11 @@ define([
2526
if (response.status == 401) { //eslint-disable-line eqeqeq
2627
window.location.replace(url.build('customer/account/login/'));
2728
} else {
28-
error = JSON.parse(response.responseText);
29+
try {
30+
error = JSON.parse(response.responseText);
31+
} catch (exception) {
32+
error = $t('Something went wrong with your request. Please try again later.')
33+
}
2934
messageContainer.addErrorMessage(error);
3035
}
3136
}

0 commit comments

Comments
 (0)