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

Only log socket errors if debug is enabled #167

Merged

Conversation

lipsumar
Copy link
Contributor

@lipsumar lipsumar commented Apr 5, 2024

Similar to #148, I'm finding the logging of socket errors to be too noisy. Even with the proxy setup to only intercept a specific domain (via tlsInterceptOnly), errors such as ECONNRESET or EPIPE happen frequently on other requests.

Following a similar approach as suggested in #148, this PR puts the console.log in the socket error listener behind options.debug. These errors being somewhat expected (comment says: Clients may disconnect at this point (for all sorts of reasons)), it seems reasonable to require the debug option to be set for them to be logged.

@pimterry pimterry merged commit 64091fc into httptoolkit:main Apr 5, 2024
9 checks passed
@pimterry
Copy link
Member

pimterry commented Apr 5, 2024

Makes sense! 👍 merged.

@pimterry
Copy link
Member

pimterry commented Apr 5, 2024

I don't think I mentioned by the way: HTTP Toolkit Pro is totally free for all contributors to the HTTP Toolkit repos.

Is that something you'd be interested in? Let me know if so, and whether you'd prefer to use the datacamp email from your commits or the gmail email on your GH profile, and I'll set up an account.

@lipsumar
Copy link
Contributor Author

lipsumar commented Apr 8, 2024

That's very generous of you, yes I'm interested! Please use my personal email on my profile. Thanks!

@pimterry
Copy link
Member

pimterry commented Apr 8, 2024

Done! 👍

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

Successfully merging this pull request may close these issues.

2 participants