Skip to content

Commit

Permalink
no internal server error in github webhook (#1786)
Browse files Browse the repository at this point in the history
  • Loading branch information
motatoes authored Oct 31, 2024
1 parent d66a68c commit 5f4873a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/controllers/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (d DiggerController) GithubAppWebHook(c *gin.Context) {
if *event.Action == "deleted" {
err := handleInstallationDeletedEvent(event)
if err != nil {
c.String(http.StatusInternalServerError, "Failed to handle webhook event.")
c.String(http.StatusAccepted, "Failed to handle webhook event.")
return
}
}
Expand All @@ -90,7 +90,7 @@ func (d DiggerController) GithubAppWebHook(c *gin.Context) {
err := handleIssueCommentEvent(gh, event, d.CiBackendProvider)
if err != nil {
log.Printf("handleIssueCommentEvent error: %v", err)
c.String(http.StatusInternalServerError, err.Error())
c.String(http.StatusAccepted, err.Error())
return
}

Expand All @@ -99,7 +99,7 @@ func (d DiggerController) GithubAppWebHook(c *gin.Context) {
err := hook(gh, event, d.CiBackendProvider)
if err != nil {
log.Printf("handleIssueCommentEvent post hook error: %v", err)
c.String(http.StatusInternalServerError, err.Error())
c.String(http.StatusAccepted, err.Error())
return
}
}
Expand All @@ -108,7 +108,7 @@ func (d DiggerController) GithubAppWebHook(c *gin.Context) {
err := handlePullRequestEvent(gh, event, d.CiBackendProvider)
if err != nil {
log.Printf("handlePullRequestEvent error: %v", err)
c.String(http.StatusInternalServerError, err.Error())
c.String(http.StatusAccepted, err.Error())
return
}
default:
Expand Down

0 comments on commit 5f4873a

Please sign in to comment.