Skip to content

Commit

Permalink
Increase verbosity in case the webhook seemed not successful
Browse files Browse the repository at this point in the history
  • Loading branch information
pilhuhn committed Mar 14, 2016
1 parent 63571e7 commit 5678732
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,13 @@ public void invokeWebhook(Action action) throws Exception {
os.write(jsonAction.getBytes());
os.flush();

int responseCode = conn.getResponseCode();
if (log.isDebugEnabled()) {
log.debug("Webhook for " + url + " . Request code: " + conn.getResponseCode());
log.debug("Webhook for " + url + " . Request code: " + responseCode);
}
if (responseCode>=400) {
log.warn("Webhook for " + method + " " + url + " resulted in code " +
responseCode + ": " + conn.getResponseMessage());
}

conn.disconnect();
Expand Down

0 comments on commit 5678732

Please sign in to comment.