Global method for response error handling
This commit is contained in:
@@ -455,6 +455,22 @@ var Dashboard = {
|
||||
});
|
||||
},
|
||||
|
||||
processErrorResponse: function (response) {
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
||||
var status = '' + response.status;
|
||||
|
||||
if (response.statusText) {
|
||||
status = response.statusText;
|
||||
}
|
||||
|
||||
Dashboard.alert({
|
||||
title: status,
|
||||
message: response.headers ? response.headers.get('X-Application-Error-Code') : null
|
||||
});
|
||||
},
|
||||
|
||||
alert: function (options) {
|
||||
|
||||
if (typeof options == "string") {
|
||||
|
||||
Reference in New Issue
Block a user