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

Clearer error message for URL without a hostname. #1691

Closed
wants to merge 1 commit into from

Conversation

bitdancer
Copy link

When I got the existing error message I had no idea what it meant. A little digging in the code reveals that the problem was I provided a URL that did not contain a hostname, so aiohttp was unable to parse the hostname out of that URL. Here is an alternate wording for the error message that I hope will lead the library user to understand what went wrong more quickly.

What do these changes do?

Are there changes in behavior for the user?

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new entry to CHANGES.rst
    • Choose any open position to avoid merge conflicts with other PRs.
    • Add a link to the issue you are fixing (if any) using #issue_number format at the end of changelog message. Use Pull Request number if there are no issues for PR or PR covers the issue only partially.

When I got the existing error message I had no idea what it meant.  A little digging in the code reveals that the problem was I provided a URL that did not contain a hostname, so aiohttp was unable to parse the hostname out of that URL.  Here is an alternate wording for the error message that I hope will lead the library user to understand what went wrong more quickly.
@fafhrd91
Copy link
Member

could you create PR against https://github.com/aio-libs/aiohttp

@fafhrd91 fafhrd91 closed this Mar 14, 2017
@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants