Skip to content

Commit

Permalink
add addtional debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
qjinatlas committed Oct 11, 2024
1 parent ec1c05a commit 44232ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions segment/analytics/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ def post(write_key, host=None, gzip=False, timeout=15, proxies=None, oauth_manag

if res.status_code == 200:
log.debug('data uploaded successfully')
try:
data = res.json()
log.debug('received response: %s', data)
except ValueError:
log.error('Unknown error: [%s] %s', res.status_code, res.reason)
return res

if oauth_manager and res.status_code in [400, 401, 403]:
Expand Down

0 comments on commit 44232ab

Please sign in to comment.