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

Emulate on_headers callback when the request failed #228

Merged
merged 2 commits into from Sep 27, 2018

Conversation

ikapelyukhin
Copy link
Contributor

If the HTTP client fails to connect or there's an SSL issue, on_headers callback isn't invoked, but on_complete is called instead -- which never fires the error handling on the response.

This should fix the flow of things and produce meaningful error messages, e.g.:

WARN -- : Error while mirroring metadata: repodata/repomd.xml - return code couldnt_connect
WARN -- : Error while mirroring metadata: repodata/repomd.xml - return code ssl_cacert

Copy link
Contributor

@Sergeykot Sergeykot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
the error messages is correct now (verified with no network and wrong DNS record)

I would mark CodeClimate warning as "wontfix"

@ikapelyukhin ikapelyukhin merged commit 4165244 into master Sep 27, 2018
@ikapelyukhin ikapelyukhin deleted the fix_tmpdir_error branch September 27, 2018 15:51
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.

None yet

2 participants