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

Missing protocol should raise descriptive error #14

Open
joepie91 opened this issue Oct 2, 2015 · 2 comments
Open

Missing protocol should raise descriptive error #14

joepie91 opened this issue Oct 2, 2015 · 2 comments
Assignees
Milestone

Comments

@joepie91
Copy link
Owner

joepie91 commented Oct 2, 2015

Currently, when specifying an invalid URL without a defined protocol (eg. bhttp.get("google.com")), an error like the following occurs (personal details removed):

Unhandled rejection TypeError: Cannot read property 'length' of null
    at S.endsWith (C:\Users\x\Documents\website\node_modules\bhttp\node_modules\string\lib\string.js:167:24)
    at S.chompRight (C:\Users\x\Documents\website\node_modules\bhttp\node_modules\string\lib\string.js:104:16)
    at C:\Users\x\Documents\website\node_modules\bhttp\lib\bhttp.js:183:47

This should raise a more descriptive error instead, indicating that the protocol is missing.

@joepie91 joepie91 self-assigned this Oct 2, 2015
@joepie91 joepie91 added this to the patch-next milestone Oct 2, 2015
@myndzi
Copy link

myndzi commented Oct 26, 2015

👍

Similar for other missing parts such as the hostname

@stevenvachon
Copy link

Duplicate of #4

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

No branches or pull requests

3 participants