Commit 2f010b20 authored by Tom Quirk's avatar Tom Quirk

Capture actual error object for Jira gql request

Instead of capturing an artificial error, we can capture
the actual error in Sentry.
parent 550065c4
...@@ -119,8 +119,8 @@ export default { ...@@ -119,8 +119,8 @@ export default {
this.totalIssues = pageInfo.total; this.totalIssues = pageInfo.total;
this.issuesCount[this.currentState] = nodes.length; this.issuesCount[this.currentState] = nodes.length;
}, },
error() { error(error) {
this.onJiraIssuesQueryError(new Error(ISSUES_LIST_FETCH_ERROR)); this.onJiraIssuesQueryError(error, ISSUES_LIST_FETCH_ERROR);
}, },
}, },
}, },
...@@ -142,7 +142,6 @@ export default { ...@@ -142,7 +142,6 @@ export default {
}, },
]; ];
}, },
getFilteredSearchValue() { getFilteredSearchValue() {
const { labels, search } = this.filterParams || {}; const { labels, search } = this.filterParams || {};
const filteredSearchValue = []; const filteredSearchValue = [];
...@@ -167,9 +166,9 @@ export default { ...@@ -167,9 +166,9 @@ export default {
return filteredSearchValue; return filteredSearchValue;
}, },
onJiraIssuesQueryError(error) { onJiraIssuesQueryError(error, message) {
createFlash({ createFlash({
message: error.message, message: message || error.message,
captureError: true, captureError: true,
error, error,
}); });
......
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