@@ -790,21 +790,28 @@ export class PullRequestOverviewPanel extends IssueOverviewPanel<PullRequestMode
790790 // Serialize resolve/unresolve operations so that concurrent calls don't race.
791791 // Each call fetches the full timeline after its mutation, and without serialization
792792 // a stale timeline response from an earlier call can overwrite a newer one.
793- this . _resolveCommentThreadQueue = this . _resolveCommentThreadQueue . then ( async ( ) => {
794- try {
795- if ( message . args . toResolve ) {
796- await this . _item . resolveReviewThread ( message . args . threadId ) ;
797- }
798- else {
799- await this . _item . unresolveReviewThread ( message . args . threadId ) ;
793+ // Normalize any prior rejection so one unexpected failure does not permanently
794+ // block later resolve/unresolve requests from running.
795+ this . _resolveCommentThreadQueue = this . _resolveCommentThreadQueue
796+ . catch ( error => {
797+ Logger . error ( `Resolve comment thread queue failed: ${ formatError ( error ) } ` , PullRequestOverviewPanel . ID ) ;
798+ } )
799+ . then ( async ( ) => {
800+ try {
801+ if ( message . args . toResolve ) {
802+ await this . _item . resolveReviewThread ( message . args . threadId ) ;
803+ }
804+ else {
805+ await this . _item . unresolveReviewThread ( message . args . threadId ) ;
806+ }
807+ const timelineEvents = await this . _getTimeline ( ) ;
808+ this . _replyMessage ( message , timelineEvents ) ;
809+ } catch ( e ) {
810+ Logger . error ( `Failed to ${ message . args . toResolve ? 'resolve' : 'unresolve' } comment thread: ${ formatError ( e ) } ` , PullRequestOverviewPanel . ID ) ;
811+ vscode . window . showErrorMessage ( vscode . l10n . t ( 'Failed to {0} comment thread: {1}' , message . args . toResolve ? 'resolve' : 'unresolve' , formatError ( e ) ) ) ;
812+ this . _replyMessage ( message , undefined ) ;
800813 }
801- const timelineEvents = await this . _getTimeline ( ) ;
802- this . _replyMessage ( message , timelineEvents ) ;
803- } catch ( e ) {
804- vscode . window . showErrorMessage ( e ) ;
805- this . _replyMessage ( message , undefined ) ;
806- }
807- } ) ;
814+ } ) ;
808815 }
809816
810817 private checkoutPullRequest ( message : IRequestMessage < any > ) : void {
0 commit comments