mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-19 16:31:01 +00:00
Expose error message when payload cannot be parsed
This commit is contained in:
parent
0c9a765956
commit
68c7342cbf
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ func (h *HookHandler) HookGithub(w http.ResponseWriter, r *http.Request) error {
|
||||||
// parse the github Hook payload
|
// parse the github Hook payload
|
||||||
hook, err := github.ParseHook([]byte(payload))
|
hook, err := github.ParseHook([]byte(payload))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
println("could not parse hook")
|
println("could not parse hook:", err.Error())
|
||||||
return RenderText(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
|
return RenderText(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue