Commit 8785aa64 authored by Clement Ho's avatar Clement Ho

Fix issue board transient failure

parent aaafd639
......@@ -68,7 +68,7 @@ export default {
<div class="flash-container"
v-if="error">
<div class="flash-alert">
An error occured. Please try again.
An error occurred. Please try again.
</div>
</div>
<label class="label-light"
......
/* global ListIssue */
/* global Flash */
import Vue from 'vue';
import queryData from '../../utils/query_data';
......@@ -108,7 +109,7 @@ gl.issueBoards.IssuesModal = Vue.extend({
if (!this.issuesCount) {
this.issuesCount = data.size;
}
});
}).catch(() => new Flash('An unexpected error has occurred.', 'alert'));
},
},
computed: {
......
/* eslint-disable space-before-function-paren, no-underscore-dangle, class-methods-use-this, consistent-return, no-shadow, no-param-reassign, max-len, no-unused-vars */
/* global ListIssue */
/* global ListLabel */
/* global Flash */
import queryData from '../utils/query_data';
const PER_PAGE = 20;
......@@ -44,7 +45,8 @@ class List {
this.position = data.position;
return this.getIssues();
});
})
.catch(() => new Flash('An unexpected error has occurred.', 'alert'));
}
destroy () {
......@@ -52,11 +54,13 @@ class List {
gl.issueBoards.BoardsStore.state.lists.splice(index, 1);
gl.issueBoards.BoardsStore.updateNewListDropdown(this.id);
gl.boardService.destroyList(this.id);
gl.boardService.destroyList(this.id)
.catch(() => new Flash('An unexpected error has occurred.', 'alert'));
}
update () {
gl.boardService.updateList(this.id, this.position);
gl.boardService.updateList(this.id, this.position)
.catch(() => new Flash('An unexpected error has occurred.', 'alert'));
}
nextPage () {
......@@ -91,7 +95,8 @@ class List {
}
this.createIssues(data.issues);
});
})
.catch(() => new Flash('Failed to load issues, please try again.', 'alert'));
}
newIssue (issue) {
......@@ -103,7 +108,8 @@ class List {
const data = resp.json();
issue.id = data.iid;
issue.milestone = data.milestone;
});
})
.catch(() => new Flash('An unexpected error has occurred.', 'alert'));
}
createIssues (data) {
......@@ -147,11 +153,13 @@ class List {
this.issues.splice(oldIndex, 1);
this.issues.splice(newIndex, 0, issue);
gl.boardService.moveIssue(issue.id, null, null, moveBeforeIid, moveAfterIid);
gl.boardService.moveIssue(issue.id, null, null, moveBeforeIid, moveAfterIid)
.catch(() => new Flash('An unexpected error has occurred.', 'alert'));
}
updateIssueLabel(issue, listFrom, moveBeforeIid, moveAfterIid) {
gl.boardService.moveIssue(issue.id, listFrom.id, this.id, moveBeforeIid, moveAfterIid);
gl.boardService.moveIssue(issue.id, listFrom.id, this.id, moveBeforeIid, moveAfterIid)
.catch(() => new Flash('An unexpected error has occurred.', 'alert'));
}
findIssue (id) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment