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.
Currently, when specifying an invalid URL without a defined protocol (eg.
bhttp.get("google.com")
), an error like the following occurs (personal details removed):This should raise a more descriptive error instead, indicating that the protocol is missing.