aboutsummaryrefslogtreecommitdiffstats
path: root/html/js/git-deps-graph.js
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2015-01-09 17:27:45 +0000
committerAdam Spiers <git@adamspiers.org>2015-01-09 17:28:55 +0000
commit5577fcadd8ad9e2dfc7528af0a09f8c6ef616118 (patch)
treeecb86aea23403ce8b23659a51a35acd55cfb45bf /html/js/git-deps-graph.js
parent38d3cc3ec85c541a46c68f985f9b1a3a925bcffe (diff)
downloadgit-deps-5577fcadd8ad9e2dfc7528af0a09f8c6ef616118.tar.gz
proper error handling for invalid commits
Diffstat (limited to 'html/js/git-deps-graph.js')
-rw-r--r--html/js/git-deps-graph.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/html/js/git-deps-graph.js b/html/js/git-deps-graph.js
index 3c15735..88c1f30 100644
--- a/html/js/git-deps-graph.js
+++ b/html/js/git-deps-graph.js
@@ -263,6 +263,12 @@ function init_cola() {
function draw_graph(commitish) {
d3.json("deps.json/" + commitish, function (error, data) {
+ if (error) {
+ var details = JSON.parse(error.responseText);
+ noty_error(details.message);
+ return;
+ }
+
var new_data = add_data(data);
init_cola();