Skip to content

Commit

Permalink
feat: add auth check to CIReporter
Browse files Browse the repository at this point in the history
  • Loading branch information
vlasy committed Jan 9, 2020
1 parent c1ef2ec commit 47cb520
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/reporters/CIReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ export class CIReporter implements IReporter {

const reportString = this.buildReport(practicesAndComponents);
this.d(reportString);
return this.postMessage(reportString);
return this.postMessage(reportString).catch((error) => {
this.d(error.message);
if (error.code === 401 || error.code === 404 || error.code === 403) {
return undefined;
}
throw error;
});
}

buildReport(practicesAndComponents: PracticeWithContextForReporter[]): string {
Expand Down

0 comments on commit 47cb520

Please sign in to comment.