aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGravatar momothereal <[email protected]>2018-06-23 11:54:34 -0400
committerGravatar momothereal <[email protected]>2018-06-23 11:54:34 -0400
commit83ac4e09560943937e03567d9d4a789a46deb9bc (patch)
tree18a123bebf20d32d2b11917b2081aa748af135ec /templates
parentSome improvements (diff)
Show more helpful error messages when editing team repo
Diffstat (limited to 'templates')
-rw-r--r--templates/main/jams/team_view.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/main/jams/team_view.html b/templates/main/jams/team_view.html
index 860a8854..95cbb0b1 100644
--- a/templates/main/jams/team_view.html
+++ b/templates/main/jams/team_view.html
@@ -171,7 +171,7 @@
}
return callback(true, data);
- }).fail(() => callback(false));
+ }).fail((xhr) => callback(false, xhr["responseJSON"]));
}
repo_submit.onclick = () => {
@@ -190,8 +190,9 @@
resetGitLabActivity();
} else {
console.log(data);
+ let message = (data && "error_message" in data) ? `Failed: ${data["error_message"]}` : "Failed to edit repository.";
UIkit.notification({
- "message": "Failed to edit repository",
+ "message": message,
"status": "danger",
"pos": "bottom-center",
"timeout": 5000