Skip to content
Permalink
Browse files
ATLAS-4541 : Improve user error message text when search queries abru…
…ptly fail

Signed-off-by: Pinal Shah <pinal.shah@freestoneinfotech.com>
  • Loading branch information
farhank31 authored and pinal-shah committed Feb 1, 2022
1 parent 23aacc8 commit 27f31c35121cbbfccc36de0c1974c95c00ebf2cd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
@@ -212,8 +212,14 @@ define(['require',
});
this.listenTo(this.searchCollection, "error", function(model, response) {
this.hideLoader({ type: 'error' });
if (response.readyState === 0) {
Utils.notifyError({
content: "Request aborted"
});
return;
}
var responseJSON = response && response.responseJSON ? response.responseJSON : null,
errorText = (responseJSON && (responseJSON.errorMessage || responseJSON.message || responseJSON.error)) || 'Invalid Expression';
errorText = (responseJSON && (responseJSON.errorMessage || responseJSON.message || responseJSON.error || responseJSON.msgDesc)) || 'Something went wrong';
if (errorText) {
Utils.notifyError({
content: errorText
@@ -219,8 +219,14 @@ define(['require',
});
this.listenTo(this.searchCollection, "error", function(model, response) {
this.hideLoader({ type: 'error' });
if (response.readyState === 0) {
Utils.notifyError({
content: "Request aborted"
});
return;
}
var responseJSON = response && response.responseJSON ? response.responseJSON : null,
errorText = (responseJSON && (responseJSON.errorMessage || responseJSON.message || responseJSON.error)) || 'Invalid Expression';
errorText = (responseJSON && (responseJSON.errorMessage || responseJSON.message || responseJSON.error || responseJSON.msgDesc)) || 'Something went wrong';
if (errorText) {
Utils.notifyError({
content: errorText

0 comments on commit 27f31c3

Please sign in to comment.