Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
Show error when failing to communicate with server
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr committed Jun 14, 2016
1 parent 9449bee commit 998460c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rd_ui/app/scripts/services/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,10 @@
refreshStatus(queryResult, query);
}, 3000);
}
})
}, function(error) {
console.log("Connection error", error);
queryResult.update({job: {error: 'failed communicating with server. Please check your Internet connection and try again.', status: 4}})
});
}

QueryResult.getById = function (id) {
Expand Down Expand Up @@ -413,6 +416,9 @@
queryResult.update(error.data);
} else if (error.status === 400 && 'job' in error.data) {
queryResult.update(error.data);
} else {
console.log("Unknown error", error);
queryResult.update({job: {error: 'unknown error occurred. Please try again later.', status: 4}})
}
});

Expand Down

0 comments on commit 998460c

Please sign in to comment.