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 {
this.totalIssues = pageInfo.total;
this.issuesCount[this.currentState] = nodes.length;
},
error() {
this.onJiraIssuesQueryError(new Error(ISSUES_LIST_FETCH_ERROR));
error(error) {
this.onJiraIssuesQueryError(error, ISSUES_LIST_FETCH_ERROR);
},
},
},
......@@ -142,7 +142,6 @@ export default {
},
];
},
getFilteredSearchValue() {
const { labels, search } = this.filterParams || {};
const filteredSearchValue = [];
......@@ -167,9 +166,9 @@ export default {
return filteredSearchValue;
},
onJiraIssuesQueryError(error) {
onJiraIssuesQueryError(error, message) {
createFlash({
message: error.message,
message: message || error.message,
captureError: true,
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