[UX] Better error notification
Created by: Tolsi
If there are some reference error in repository and I try to see a commit network, then I just see round progress bar, but in the browser debug console I have 500 request error.
In the log on the server side, I see that:
Started GET "/commons/repo/network/dev.json?format=json" for ... at 2016-03-14 16:14:26 +0000
Processing by Projects::NetworkController#show as JSON
Parameters: {"namespace_id"=>"commons", "project_id"=>"repo", "id"=>"dev"}
Completed 500 Internal Server Error in 49ms (ActiveRecord: 3.1ms)
Rugged::ReferenceError (Reference 'refs/remotes/origin/master' not found):
app/models/repository.rb:315:in `method_missing'
app/models/network/commit.rb:15:in `method_missing'
app/models/network/graph.rb:124:in `include_ref?'
app/models/network/graph.rb:113:in `block in commits_sort_by_ref'
app/models/network/graph.rb:112:in `sort'
app/models/network/graph.rb:112:in `commits_sort_by_ref'
app/models/network/graph.rb:57:in `index_commits'
app/models/network/graph.rb:17:in `initialize'
app/controllers/projects/network_controller.rb:18:in `new'
app/controllers/projects/network_controller.rb:18:in `block (2 levels) in show'
app/controllers/projects/network_controller.rb:14:in `show'
This is misleading, it may be worth displaying error on the page?