When Jenkins doesn't respond, we currently thrown an exception.
Instead, we should show a nice error page explaining Jenkins isn't currently available.
RestClient automatically generates exception for each error code, extending RestClient::Exception:
http://www.rubydoc.info/gems/rest-client/1.6.1/RestClient/Exception
We could so catch that and return a special view displaying the relevant error code stored in #http_code.
Stacktrace
/usr/local/lib/ruby/2.2.0/net/http.rb in start return yield(self) /usr/src/app/tommy.rb in prepare_dashboard @projects = Project.parse_incoming_json(JSON.parse(json.get)) /usr/src/app/tommy.rb in block in <main> prepare_dashboard /usr/local/lib/ruby/2.2.0/webrick/httpserver.rb in service si.service(req, res) /usr/local/lib/ruby/2.2.0/webrick/httpserver.rb in run server.service(req, res) /usr/local/lib/ruby/2.2.0/webrick/server.rb in block in start_thread block ? block.call(sock) : run(sock) GET