Skip to content

Commit

Permalink
... again..........
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-corbalt committed Mar 7, 2024
1 parent eebabff commit 3822749
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 25 deletions.
15 changes: 4 additions & 11 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 5 additions & 14 deletions src/libs/jira-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,24 +155,15 @@ export class Jira {
totalIssuesReceived += results.issues.length;
startAt = totalIssuesReceived;
total = results.total;
} catch (error: any) {
} catch (error: unknown) {
if (error instanceof AxiosError) {
console.log("We have an AxiosError")
}
console.log(error.constructor.name);
let errMsg = error.errors ? error.errors.map((err: any) => err.toString()).join(', ') : error.toString();
console.error(errMsg);
if (error instanceof AggregateError) {
console.error("we got an aggregate error");

const errors = error.errors;

for (const error of errors) {
console.log(error.message);
if (error.cause instanceof AggregateError) {
let errMsg = error.cause.errors ? error.cause.errors.map((err: any) => err.toString()).join(', ') : error.toString();
console.error(errMsg);
}
}
else {
throw new Error(`Error getting Security Hub issues from Jira test: ${error} test`);
throw new Error(`Error getting Security Hub issues from Jira: ${error}`);
}
}
} while (totalIssuesReceived < total);
Expand Down

0 comments on commit 3822749

Please sign in to comment.