summaryrefslogtreecommitdiffstats
path: root/modules/webhook/deliver.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/webhook/deliver.go')
-rw-r--r--modules/webhook/deliver.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/webhook/deliver.go b/modules/webhook/deliver.go
index 89a95c52f2..7b0c651733 100644
--- a/modules/webhook/deliver.go
+++ b/modules/webhook/deliver.go
@@ -26,6 +26,14 @@ import (
// Deliver deliver hook task
func Deliver(t *models.HookTask) error {
+ defer func() {
+ err := recover()
+ if err == nil {
+ return
+ }
+ // There was a panic whilst delivering a hook...
+ log.Error("PANIC whilst trying to deliver webhook[%d] for repo[%d] to %s Panic: %v\nStacktrace: %s", t.ID, t.RepoID, t.URL, err, log.Stack(2))
+ }()
t.IsDelivered = true
var req *http.Request