diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-05-09 22:12:51 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-05-10 00:37:26 +0300 |
commit | fb7c9401d4fe8309ca0199e8a182d06eaac159dc (patch) | |
tree | 8a0b3b8fb66232fb85dab9f7955fdcdf7961f142 /app/assets/javascripts/boards/models | |
parent | 561ec48cfae5dd453646cba40f3e5f1f7b1147ea (diff) |
stub error handlers where uncaught Promise rejections currently exist
Diffstat (limited to 'app/assets/javascripts/boards/models')
-rw-r--r-- | app/assets/javascripts/boards/models/list.js | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/app/assets/javascripts/boards/models/list.js b/app/assets/javascripts/boards/models/list.js index bd2f62bcc1a..90561d0f7a8 100644 --- a/app/assets/javascripts/boards/models/list.js +++ b/app/assets/javascripts/boards/models/list.js @@ -25,7 +25,9 @@ class List { } if (this.type !== 'blank' && this.id) { - this.getIssues(); + this.getIssues().catch(() => { + // TODO: handle request error + }); } } @@ -52,11 +54,17 @@ 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(() => { + // TODO: handle request error + }); } update () { - gl.boardService.updateList(this.id, this.position); + gl.boardService.updateList(this.id, this.position) + .catch(() => { + // TODO: handle request error + }); } nextPage () { @@ -146,11 +154,17 @@ 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(() => { + // TODO: handle request error + }); } 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(() => { + // TODO: handle request error + }); } findIssue (id) { |