Skip to content

Commit

Permalink
Move log after empty check, dont even log
Browse files Browse the repository at this point in the history
  • Loading branch information
Tit Petric authored and titpetric committed Jan 9, 2025
1 parent 07a4d76 commit b8dca4e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gateway/event_handler_webhooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,14 @@ func (w *WebHookHandler) getRequestMethod(m string) WebHookRequestMethod {
}

func (w *WebHookHandler) checkURL(r string) bool {
log.WithFields(logrus.Fields{
"prefix": "webhooks",
}).Debug("Checking URL: ", r)
if r == "" {
return false
}

log.WithFields(logrus.Fields{
"prefix": "webhooks",
}).Debug("Checking URL: ", r)

if _, err := url.ParseRequestURI(r); err != nil {
log.WithFields(logrus.Fields{
"prefix": "webhooks",
Expand Down

0 comments on commit b8dca4e

Please sign in to comment.