jpetrucciani / hubspot3

python3.6+ hubspot client based on hapipy, but modified to use the newer endpoints and non-legacy python
MIT License
146 stars 72 forks source link

Remove hapikey on error logs #90

Closed antonioIrizar closed 4 years ago

antonioIrizar commented 4 years ago

Remove hapikey on error logs Current error log:

---- request ----
GET api.hubapi.com/deals/v1/deal/-1?hapikey=f3268339-9593-462b-8cba-30b4823eb2b2, [timeout=<class 'int'>]
---- body ----
<class 'NoneType'>
---- headers ----
<class 'dict'>
---- result ----
<class 'int'>
---- body -----
{"status":"error","message":"Deal does not exist","correlationId":"25ec2a3d-f2a3-415c-bac5-590ce38ebd37","requestId":"0e605c86-92ae-4073-9a79-20faf1dd5261"}
---- headers -----
<class 'http.client.HTTPMessage'>
---- reason ----
Not Found
---- trigger error ----
<class 'NoneType'>

New error log:

---- request ----
GET api.hubapi.com/deals/v1/deal/-1?hapikey=f326****, [timeout=<class 'int'>]
---- body ----
<class 'NoneType'>
---- headers ----
<class 'dict'>
---- result ----
<class 'int'>
---- body -----
{"status":"error","message":"Deal does not exist","correlationId":"4b1ff5c2-f736-4b34-85fb-b3bfe0d85b6b","requestId":"24853294-b30e-4679-94a9-ce61cd1bf033"}
---- headers -----
<class 'http.client.HTTPMessage'>
---- reason ----
Not Found
---- trigger error ----
<class 'NoneType'>
jpetrucciani commented 4 years ago

LGTM, thanks for the contribution!

jpetrucciani commented 4 years ago

This is now live on pip as version 3.2.43!

Thanks again for your contribution! 😄