MrDys / blacklight

Blacklight Plugin
http://projectblacklight.org/
Other
1 stars 1 forks source link

Blacklight should throw more helpful errors if it is unable to connect to Solr #505

Open MrDys opened 12 years ago

MrDys commented 12 years ago

CODEBASE-320: Currently, if Blacklight is unable to connect to Solr, the Errno::ECONNREFUSED exception is raised (if you are lucky -- if something actually /is/ listening on the port, it could be more cryptic.), with this stacktrace:

/Users/chris_beer/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/net/http.rb:560:in initialize' /Users/chris_beer/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/net/http.rb:560:inopen' /Users/chris_beer/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/net/http.rb:560:in connect' /Users/chris_beer/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/timeout.rb:53:intimeout' /Users/chris_beer/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/timeout.rb:101:in timeout' /Users/chris_beer/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/net/http.rb:560:inconnect' /Users/chris_beer/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/net/http.rb:553:in do_start' /Users/chris_beer/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/net/http.rb:542:instart' /Users/chris_beer/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/net/http.rb:1035:in request' rsolr (1.0.0) lib/rsolr/connection.rb:15:inexecute' rsolr (1.0.0) lib/rsolr/client.rb:151:in execute' rsolr (1.0.0) lib/rsolr/client.rb:146:insend_and_receive'

It might be nice to try to rescue these and throw a Blacklight-level Solr exception instead that could provide friendlier information to new implementors (especially in the development environment).

MrDys commented 12 years ago

Original reporter: cbeer

MrDys commented 12 years ago

cbeer: Batch move to 3.0.1