From 00cdeeec601d4fee9757ccf840df98e55fe25077 Mon Sep 17 00:00:00 2001 From: Andrew Cremins Date: Thu, 7 Mar 2024 08:36:42 -0800 Subject: [PATCH] ... again.. --- dist/index.js | 33 ++++++++++++++++----------------- src/libs/jira-lib.ts | 8 ++++---- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/dist/index.js b/dist/index.js index e30891d..fefceac 100644 --- a/dist/index.js +++ b/dist/index.js @@ -82155,23 +82155,22 @@ class Jira { let startAt = 0; let total = 0; do { - try { - const response = await this.axiosInstance.post('/rest/api/2/search', { - jql: fullQuery, - startAt: startAt, - maxResults: 50, - fields: ["*all"] - }); - const results = response.data; - allIssues = allIssues.concat(results.issues); - totalIssuesReceived += results.issues.length; - startAt = totalIssuesReceived; - total = results.total; - } - catch (error) { - throw new Error(`Error getting Security Hub issues from Jira: ${error}`); - //throw new Error(`Error getting Security Hub issues from Jira: ${error instanceof AggregateError ? error.message : error}`); - } + //try { + const response = await this.axiosInstance.post('/rest/api/2/search', { + jql: fullQuery, + startAt: startAt, + maxResults: 50, + fields: ["*all"] + }); + const results = response.data; + allIssues = allIssues.concat(results.issues); + totalIssuesReceived += results.issues.length; + startAt = totalIssuesReceived; + total = results.total; + //} catch (error) { + // throw new Error(`Error getting Security Hub issues from Jira: ${error}`); + //throw new Error(`Error getting Security Hub issues from Jira: ${error instanceof AggregateError ? error.message : error}`); + //} } while (totalIssuesReceived < total); return allIssues; } diff --git a/src/libs/jira-lib.ts b/src/libs/jira-lib.ts index c068e5d..6905976 100644 --- a/src/libs/jira-lib.ts +++ b/src/libs/jira-lib.ts @@ -143,7 +143,7 @@ export class Jira { let total = 0; do { - try { + //try { const response = await this.axiosInstance.post('/rest/api/2/search', { jql: fullQuery, startAt: startAt, @@ -155,10 +155,10 @@ export class Jira { totalIssuesReceived += results.issues.length; startAt = totalIssuesReceived; total = results.total; - } catch (error) { - throw new Error(`Error getting Security Hub issues from Jira: ${error}`); + //} catch (error) { + // throw new Error(`Error getting Security Hub issues from Jira: ${error}`); //throw new Error(`Error getting Security Hub issues from Jira: ${error instanceof AggregateError ? error.message : error}`); - } + //} } while (totalIssuesReceived < total); return allIssues;