mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-23 13:52:29 +00:00
Add request ID logging on missing command
This commit is contained in:
parent
38294cd0c6
commit
4407c0190b
1 changed files with 2 additions and 2 deletions
|
@ -569,12 +569,12 @@ func handleHook(h *hook.Hook, rid string, headers, query, payload *map[string]in
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("unable to locate command: '%s'", h.ExecuteCommand)
|
log.Printf("[%s] error locating command: '%s'", rid, h.ExecuteCommand)
|
||||||
|
|
||||||
// check if parameters specified in execute-command by mistake
|
// check if parameters specified in execute-command by mistake
|
||||||
if strings.IndexByte(h.ExecuteCommand, ' ') != -1 {
|
if strings.IndexByte(h.ExecuteCommand, ' ') != -1 {
|
||||||
s := strings.Fields(h.ExecuteCommand)[0]
|
s := strings.Fields(h.ExecuteCommand)[0]
|
||||||
log.Printf("use 'pass-arguments-to-command' to specify args for '%s'", s)
|
log.Printf("[%s] use 'pass-arguments-to-command' to specify args for '%s'", rid, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
return "", err
|
return "", err
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue