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

feat(log): also report negotiations error in WARN level #72

Merged
merged 2 commits into from
Mar 23, 2017

Conversation

ankostis
Copy link
Contributor

@ankostis ankostis commented Mar 8, 2017

  • Like feat(log): report every connection failure in DEBUG level #70, but also for negotiation errors (e.g. user/pswd denied
    messages).
  • Increase log-level from DEBUG-->WARNING because if dest-address
    resolves to multiple IPs, practically that is the only place where the
    real failure-cause it is reported.
  • Correct way should have been to log from within Python's
    socket.create_connection().
  • FIX ProxyError exception that did not set args and, among others, repr() is empty.

- Like Anorov#70, but also for negotiation errors (e.g. user/pswd denied
messages).
- Increase log-level from DEBUG-->WARNING because if dest-address
resolves to multiple IPs, practically that is the only place where the
real failure-cause it is reported.
- Correct way should have been to log from within Python's
`socket.create_connection()`.
+ Utilize parent-class `Exception.args` and preserve existing API's
`msg` and `socket_error` attributes as @Property definitions.
+ Move part of `_prepare_msg()` formatting code into refactored
ProxyError classes.
@ankostis
Copy link
Contributor Author

ankostis commented Mar 8, 2017

If in the far future Python-lib accepts python/cpython#562 (http://bugs.python.org/issue29757#) gets merged, then this PR can be reverted.

@Anorov Anorov merged commit 5c33db6 into Anorov:master Mar 23, 2017
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