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

html-proofer should eat Typhoeus exceptions #248

Closed
getaaron opened this issue Oct 1, 2015 · 1 comment
Closed

html-proofer should eat Typhoeus exceptions #248

getaaron opened this issue Oct 1, 2015 · 1 comment

Comments

@getaaron
Copy link

getaaron commented Oct 1, 2015

In url_validator.rb, url_processor calls this method in an each_pair loop:

def queue_request(method, href, filenames)
  request = Typhoeus::Request.new(href, @typhoeus_opts.merge({ :method => method }))
  request.on_complete { |response| response_handler(response, filenames) }
  hydra.queue request
end

Typhoeus will raise an exception on a bad URL, such as http://127.0.0.1:____. When this happens, html-proofer will not test any future docs.

  • Is it possible to wrap this in begin…rescue?
  • Alternatively, can html-proofer validate a URL before passing it in?

I think a mangled URL shouldn't halt html-proofer.

I just started using html-proofer today, so if there's an option I'm missing or something else I'm overlooking, please let me know.

@gjtorikian
Copy link
Owner

There's no option to ignore this currently, but I agree that it should not explode everything. I'll make a fix. Thanks!

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

No branches or pull requests

2 participants