Skip to content

Commit

Permalink
Better logging of errors from web change hooks.
Browse files Browse the repository at this point in the history
The error message was getting discarded, making debugging impossible.
  • Loading branch information
tomprince committed Oct 2, 2012
1 parent a415efa commit bfdb69e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions master/buildbot/status/web/change_hook.py
Expand Up @@ -63,8 +63,8 @@ def render_POST(self, request):
except ValueError, err:
request.setResponseCode(400, err.args[0])
return err.args[0]
except Exception:
log.err(None, "Exception processing web hook.")
except Exception, e:
log.err(e, "processing changes from web hook")
msg = "Error processing changes."
request.setResponseCode(500, msg)
return msg
Expand All @@ -78,7 +78,8 @@ def render_POST(self, request):
def ok(_):
request.setResponseCode(202)
request.finish()
def err(_):
def err(why):
log.err(why, "adding changes from web hook")
request.setResponseCode(500)
request.finish()
d.addCallbacks(ok, err)
Expand Down

0 comments on commit bfdb69e

Please sign in to comment.