Add logging on BitBucket schema validation exception
Chatty but worthy No need to create a custom debugging web hook anymore for Bitbucket
This commit is contained in:
parent
5dae970787
commit
674c16bf3b
1 changed files with 2 additions and 0 deletions
|
@ -183,6 +183,7 @@ def get_transformed_commit_info(bb_commit, ref, default_branch, repository_name,
|
|||
try:
|
||||
validate(bb_commit, BITBUCKET_COMMIT_INFO_SCHEMA)
|
||||
except Exception as exc:
|
||||
logger.exception('Exception when validating Bitbucket commit information: %s from %s', exc.message, bb_commit)
|
||||
raise InvalidPayloadException(exc.message)
|
||||
|
||||
commit = JSONPathDict(bb_commit)
|
||||
|
@ -216,6 +217,7 @@ def get_transformed_webhook_payload(bb_payload, default_branch=None):
|
|||
try:
|
||||
validate(bb_payload, BITBUCKET_WEBHOOK_PAYLOAD_SCHEMA)
|
||||
except Exception as exc:
|
||||
logger.exception('Exception when validating Bitbucket webhook payload: %s from %s', exc.message, bb_payload)
|
||||
raise InvalidPayloadException(exc.message)
|
||||
|
||||
payload = JSONPathDict(bb_payload)
|
||||
|
|
Reference in a new issue