Skip to content

Commit

Permalink
Add the body in the error in order to see it in the logs
Browse files Browse the repository at this point in the history
  • Loading branch information
yaslama committed Nov 15, 2023
1 parent af84886 commit 9219a32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions http/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package http

import (
"bytes"
"errors"
"fmt"
"io"
"log"
"net/http"
Expand Down Expand Up @@ -109,7 +109,7 @@ func addWebHookRouter(r *gin.RouterGroup, notifier *notify.Notifier) {

if validPayload == nil {
log.Printf("invalid payload, body: %s", body)
c.AbortWithError(http.StatusBadRequest, errors.New("unsupported payload"))
c.AbortWithError(http.StatusBadRequest, fmt.Errorf("unsupported payload, body: %s", body))
return
}

Expand Down

0 comments on commit 9219a32

Please sign in to comment.