lostisland / faraday

Simple, but flexible HTTP client library, with support for multiple backends.
https://lostisland.github.io/faraday
MIT License
5.72k stars 972 forks source link

#1346 - NoMethod Error Given When URL is not formatted properly #1433

Closed JAugusto42 closed 2 years ago

JAugusto42 commented 2 years ago

Description

Adding a raise to handling exception when the URL is incomplete, by adding a message reporting the error. related issue #1346

Todos

List any remaining work that needs to be done, i.e:

Additional Notes

this is just a proposal to start thinking about the best way to solve this.

JAugusto42 commented 2 years ago

Okay, thanks for the advices and the review, and what about the exception message? any suggestion? I'll take a look at it and see what I can do.

iMacTia commented 2 years ago

About the error message itself, https is a great default, but http should also be supported, so the error message is a bit misleading. As for the check, I'm not sure that checking for the presence of a host is going to be enough to ensure the URL is a valid http/https URL 🤔, but that's why I'd like to see some tests since I could be completely wrong on this one 😄