Skip to content

Clearer error message for URL without a hostname.#1691

Closed
bitdancer wants to merge 1 commit intoaio-libs:1.3from
bitdancer:patch-3
Closed

Clearer error message for URL without a hostname.#1691
bitdancer wants to merge 1 commit intoaio-libs:1.3from
bitdancer:patch-3

Conversation

@bitdancer
Copy link
Copy Markdown

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
Copy Markdown
Member

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

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