diff --git a/src/dotnet/APIView/APIViewWeb/Managers/PullRequestManager.cs b/src/dotnet/APIView/APIViewWeb/Managers/PullRequestManager.cs index 5a95717b846..65fc0ed8b55 100644 --- a/src/dotnet/APIView/APIViewWeb/Managers/PullRequestManager.cs +++ b/src/dotnet/APIView/APIViewWeb/Managers/PullRequestManager.cs @@ -160,7 +160,15 @@ public async Task CleanupPullRequestData() private async Task GetExistingCommentForPackage(string repoOwner, string repoName, int pr) { - var comments = await _githubClient.Issue.Comment.GetAllForIssue(repoOwner, repoName, pr); + IReadOnlyList comments = null; + try + { + comments = await _githubClient.Issue.Comment.GetAllForIssue(repoOwner, repoName, pr); + } + catch (Exception ex) + { + _telemetryClient.TrackException(ex); + } if (comments != null) { // Check for comment created for current package. diff --git a/src/dotnet/APIView/ClientSPA/src/app/_components/code-panel/code-panel.component.ts b/src/dotnet/APIView/ClientSPA/src/app/_components/code-panel/code-panel.component.ts index 3ca8d7bf966..7fac39a2b40 100644 --- a/src/dotnet/APIView/ClientSPA/src/app/_components/code-panel/code-panel.component.ts +++ b/src/dotnet/APIView/ClientSPA/src/app/_components/code-panel/code-panel.component.ts @@ -49,7 +49,7 @@ export class CodePanelComponent implements OnChanges{ if (changes['codePanelRowData']) { if (changes['codePanelRowData'].currentValue.length > 0) { this.loadCodePanelViewPort(); - this.updateHasActiveConversiations(); + this.updateHasActiveConversations(); } else { this.isLoading = true; this.codePanelRowSource = undefined; @@ -439,7 +439,7 @@ export class CodePanelComponent implements OnChanges{ next: () => { this.codePanelData!.nodeMetaData[data.nodeIdHashed!].commentThread[data.associatedRowPositionInGroup].comments.filter(c => c.id === data.commentId)[0].commentText = data.commentText; this.updateItemInScroller(this.codePanelData!.nodeMetaData[data.nodeIdHashed!].commentThread[data.associatedRowPositionInGroup]); - this.updateHasActiveConversiations(); + this.updateHasActiveConversations(); } }); } @@ -451,7 +451,7 @@ export class CodePanelComponent implements OnChanges{ comments.push(response); this.codePanelData!.nodeMetaData[data.nodeIdHashed!].commentThread[data.associatedRowPositionInGroup].comments = [...comments] this.updateItemInScroller(this.codePanelData!.nodeMetaData[data.nodeIdHashed!].commentThread[data.associatedRowPositionInGroup]); - this.updateHasActiveConversiations(); + this.updateHasActiveConversations(); } } ); @@ -470,7 +470,7 @@ export class CodePanelComponent implements OnChanges{ } else { this.updateItemInScroller(this.codePanelData!.nodeMetaData[data.nodeIdHashed!].commentThread[data.associatedRowPositionInGroup]); } - this.updateHasActiveConversiations(); + this.updateHasActiveConversations(); } }); } @@ -482,7 +482,7 @@ export class CodePanelComponent implements OnChanges{ this.codePanelData!.nodeMetaData[data.nodeIdHashed!].commentThread[data.associatedRowPositionInGroup].isResolvedCommentThread = true; this.codePanelData!.nodeMetaData[data.nodeIdHashed!].commentThread[data.associatedRowPositionInGroup].commentThreadIsResolvedBy = this.userProfile?.userName!; this.updateItemInScroller({ ...this.codePanelData!.nodeMetaData[data.nodeIdHashed!].commentThread[data.associatedRowPositionInGroup]}); - this.updateHasActiveConversiations(); + this.updateHasActiveConversations(); } }); } @@ -492,7 +492,7 @@ export class CodePanelComponent implements OnChanges{ this.codePanelData!.nodeMetaData[data.nodeIdHashed!].commentThread[data.associatedRowPositionInGroup].isResolvedCommentThread = false; this.codePanelData!.nodeMetaData[data.nodeIdHashed!].commentThread[data.associatedRowPositionInGroup].commentThreadIsResolvedBy = ''; this.updateItemInScroller({ ...this.codePanelData!.nodeMetaData[data.nodeIdHashed!].commentThread[data.associatedRowPositionInGroup]}); - this.updateHasActiveConversiations(); + this.updateHasActiveConversations(); } }); } @@ -514,7 +514,7 @@ export class CodePanelComponent implements OnChanges{ }); } - private updateHasActiveConversiations() { + private updateHasActiveConversations() { let hasActiveConversations = false; for (let row of this.codePanelRowData) { if (row.type === CodePanelRowDatatype.CommentThread) {