Skip to content

Commit

Permalink
fix(webhook/logging): log response code only if response is not none (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gagantrivedi committed Jan 31, 2024
1 parent 4a5f5e6 commit ea42a34
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api/integrations/webhook/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ def __init__(self, config: WebhookConfiguration):

def _identify_user(self, data: typing.Mapping) -> None:
response = call_integration_webhook(self.config, data)
logger.debug(
"Sent event to Webhook. Response code was: %s" % response.status_code
)
if response:
logger.debug(
"Sent event to Webhook. Response code was: %s" % response.status_code
)

def generate_user_data(
self,
Expand Down

0 comments on commit ea42a34

Please sign in to comment.