Skip to content

Commit ce92fa2

Browse files
committed
MAGETWO-60982: AJAX calls does not process error responses
1 parent 502b860 commit ce92fa2

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

lib/web/mage/backend/bootstrap.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,7 @@ define([
1414
], function ($, mage) {
1515
'use strict';
1616

17-
var errorMessages = {
18-
error: $.mage.__('HTTP Error'),
19-
abort: $.mage.__('The request was aborted by the server'),
20-
timeout: $.mage.__('The request timed out'),
21-
parsererror: $.mage.__('XML/Json format is bad')
22-
},
23-
bootstrap;
17+
var bootstrap;
2418

2519
$.ajaxSetup({
2620
/*
@@ -84,7 +78,10 @@ define([
8478
$('body').notification('clear')
8579
.notification('add', {
8680
error: true,
87-
message: errorMessages[status] + ' (' + jqXHR.status + ' ' + jqXHR.statusText + ')',
81+
message: $.mage.__(
82+
'A technical problem with the server created an error. ' +
83+
'Try again to continue what you were doing. If the problem persists, try again later.'
84+
),
8885

8986
/**
9087
* @param {*} message

0 commit comments

Comments
 (0)