Skip to content

Commit c08f33c

Browse files
committed
improved error handling
1 parent 69b2db3 commit c08f33c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

backend/controllers/github.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ func handlePullRequestEvent(gh utils.GithubClientProvider, payload *github.PullR
517517
if err != nil {
518518
log.Printf("could not post ai summary comment: %v", err)
519519
commentReporterManager.UpdateComment(fmt.Sprintf(":x: could not post ai comment summary comment id: %v", err))
520+
return fmt.Errorf("could not post ai summary comment: %v", err)
520521
}
521522
aiSummaryCommentId = aiSummaryComment.Id
522523
}
@@ -924,6 +925,7 @@ func handleIssueCommentEvent(gh utils.GithubClientProvider, payload *github.Issu
924925
if err != nil {
925926
log.Printf("could not post ai summary comment: %v", err)
926927
commentReporterManager.UpdateComment(fmt.Sprintf(":x: could not post ai comment summary comment id: %v", err))
928+
return fmt.Errorf("could not post ai summary comment: %v", err)
927929
}
928930
aiSummaryCommentId = aiSummaryComment.Id
929931
}

0 commit comments

Comments
 (0)