summaryrefslogtreecommitdiffstats
path: root/api4/webhook.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-08-18 15:58:26 -0700
committerGitHub <noreply@github.com>2017-08-18 15:58:26 -0700
commit4a8afebcdb8e8c88b4191d68cb1b5712d12cee9c (patch)
treefba1b8f62db029d510fc3513fd8febece8925e27 /api4/webhook.go
parent2b3f7d0bc3c0cd415e9e8f0a1cf0af6e6bac5b8a (diff)
downloadchat-4a8afebcdb8e8c88b4191d68cb1b5712d12cee9c.tar.gz
chat-4a8afebcdb8e8c88b4191d68cb1b5712d12cee9c.tar.bz2
chat-4a8afebcdb8e8c88b4191d68cb1b5712d12cee9c.zip
Adding debugging for webhook (#7199)
* Adding debugging for webhook * Fixing build error * Moving error down
Diffstat (limited to 'api4/webhook.go')
-rw-r--r--api4/webhook.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/api4/webhook.go b/api4/webhook.go
index e34cc4137..0afcc09f8 100644
--- a/api4/webhook.go
+++ b/api4/webhook.go
@@ -476,7 +476,12 @@ func incomingWebhook(c *Context, w http.ResponseWriter, r *http.Request) {
}
}
- parsedRequest := model.IncomingWebhookRequestFromJson(payload)
+ parsedRequest, decodeError := model.IncomingWebhookRequestFromJson(payload)
+
+ if decodeError != nil {
+ c.Err = decodeError
+ return
+ }
err := app.HandleIncomingWebhook(id, parsedRequest)
if err != nil {