Expose error message when payload cannot be parsed

This commit is contained in:
Marcus Ramberg 2014-04-06 14:34:11 +02:00
parent 0c9a765956
commit 68c7342cbf

View file

@ -47,7 +47,7 @@ func (h *HookHandler) HookGithub(w http.ResponseWriter, r *http.Request) error {
// parse the github Hook payload
hook, err := github.ParseHook([]byte(payload))
if err != nil {
println("could not parse hook")
println("could not parse hook:", err.Error())
return RenderText(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
}