Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions should not expose email address #47

Open
WesleyBatista opened this issue Jul 10, 2019 · 3 comments
Open

Exceptions should not expose email address #47

WesleyBatista opened this issue Jul 10, 2019 · 3 comments

Comments

@WesleyBatista
Copy link

I think we have room for improvements on the exception handling side.

this is one example of output when a server side error happens:

HubspotServerError

Hubspot Error

---- request ----
POST api.hubapi.com/contacts/v1/contact/createOrUpdate/email/[email protected]?, [timeout=<class 'int'>]

---- body ----
<class 'NoneType'>

---- headers ----
<class 'dict'>

---- result ----
<class 'int'>

---- body -----
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>cloudflare</center>
</body>
</html>


---- headers -----
<class 'http.client.HTTPMessage'>

---- reason ----
Bad Gateway

---- trigger error ----
<class 'NoneType'>

As a solution on such cases we can catch the exception and try to somehow parse the reason, but would be way more convenient if such thing come from the package.

@jpetrucciani
Copy link
Owner

Hmm, so if I'm understanding this correctly, you'd want the exception to filter/hide sensitive data (emails, contact IDs, etc.)?

@WesleyBatista
Copy link
Author

yes

@WesleyBatista
Copy link
Author

I would like to come up with a PR for this, but lacking on time to do it :/

I thought that I should at least create the issue so somebody could pick it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants