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

Improve accessing ontologies without submissions #227

Open
alexskr opened this issue Nov 2, 2022 · 1 comment
Open

Improve accessing ontologies without submissions #227

alexskr opened this issue Nov 2, 2022 · 1 comment

Comments

@alexskr
Copy link
Member

alexskr commented Nov 2, 2022

UI doesn't gracefully handle accessing ontologies without submissions. Even though users might not see errors (unless they view the page with developer tools enabled in the browser) UI and API logs ERROR.
Ideally, UI should not make a bunch of API calls which would fail for ontologies that do not have any submissions

UI:

F, [2022-11-02T12:04:41.946626 #9934] FATAL -- : [d0b5e91b-54d6-4113-b0e4-28eff36ba58b]
[d0b5e91b-54d6-4113-b0e4-28eff36ba58b] ActiveRecord::RecordNotFound (Not Found):
[d0b5e91b-54d6-4113-b0e4-28eff36ba58b]
[d0b5e91b-54d6-4113-b0e4-28eff36ba58b] app/controllers/application_controller.rb:91:in `not_found'
[d0b5e91b-54d6-4113-b0e4-28eff36ba58b] app/controllers/application_controller.rb:413:in `get_class'
[d0b5e91b-54d6-4113-b0e4-28eff36ba58b] app/controllers/ontologies_controller.rb:144:in `classes'
[d0b5e91b-54d6-4113-b0e4-28eff36ba58b] app/controllers/ontologies_controller.rb:301:in `show'
E, [2022-11-02T12:08:20.958856 #21724] ERROR -- : [0d3adbc7-e14d-4489-a01c-faf2d8d0c93e] No submissions for ontology: https://data.bioontology.org/ontologies/APPENDIX
F, [2022-11-02T12:08:22.203664 #9934] FATAL -- : [f5f7ce91-a81a-4f60-aee8-24fd9eb92d5f]
[f5f7ce91-a81a-4f60-aee8-24fd9eb92d5f] NoMethodError (undefined method `first' for nil:NilClass):
[f5f7ce91-a81a-4f60-aee8-24fd9eb92d5f]
[f5f7ce91-a81a-4f60-aee8-24fd9eb92d5f] app/controllers/application_controller.rb:400:in `get_class'
[f5f7ce91-a81a-4f60-aee8-24fd9eb92d5f] app/controllers/concepts_controller.rb:84:in `show_tree'
E, [2022-11-02T12:08:22.226937 #16903] ERROR -- : [31d0e721-665a-4455-94e7-17d07568f450] No submissions for ontology: https://data.bioontology.org/ontologies/APPENDIX
E, [2022-11-02T12:08:22.272683 #23768] ERROR -- : [018eb902-6070-4411-a9e7-8d778f70d347] No submissions for ontology: https://data.bioontology.org/ontologies/APPENDIX
E, [2022-11-02T12:08:22.277970 #23960] ERROR -- : [f622caa8-3861-464b-b7c5-d4d95881327e] No submissions for ontology: https://data.bioontology.org/ontologies/APPENDIX
E, [2022-11-02T12:08:22.290463 #21724] ERROR -- : [ab370dad-4f9e-4d45-a2f3-94ed125490f7] No submissions for ontology: https://data.bioontology.org/ontologies/APPENDIX
E, [2022-11-02T12:08:22.295847 #23802] ERROR -- : [01a80ca7-84d2-4c17-8937-5b5ca07560f2] No submissions for ontology: https://data.bioontology.org/ontologies/APPENDIX
F, [2022-11-02T12:08:22.374088 #16903] FATAL -- : [31d0e721-665a-4455-94e7-17d07568f450]
[31d0e721-665a-4455-94e7-17d07568f450] NoMethodError (undefined method `first' for nil:NilClass):
[31d0e721-665a-4455-94e7-17d07568f450]
[31d0e721-665a-4455-94e7-17d07568f450] app/controllers/application_controller.rb:400:in `get_class'
[31d0e721-665a-4455-94e7-17d07568f450] app/controllers/ontologies_controller.rb:144:in `classes'
[31d0e721-665a-4455-94e7-17d07568f450] app/controllers/ontologies_controller.rb:301:in `show'
F, [2022-11-02T12:08:22.426568 #23960] FATAL -- : [f622caa8-3861-464b-b7c5-d4d95881327e]
[f622caa8-3861-464b-b7c5-d4d95881327e] ActionView::Template::Error (undefined method `first' for nil:NilClass):
[f622caa8-3861-464b-b7c5-d4d95881327e]     134:                           %code uri
[f622caa8-3861-464b-b7c5-d4d95881327e]     135:                           put the complete URI of the class (e.g.,
[f622caa8-3861-464b-b7c5-d4d95881327e]     136:                           = succeed ")" do
[f622caa8-3861-464b-b7c5-d4d95881327e]     137:                             %a.external.free{:href => @ontology.explore.classes["collection"].first.id, :rel => "nofollow", :title => "/visualize/39478/Common_Neoplasm"}
[f622caa8-3861-464b-b7c5-d4d95881327e]     138:                               = @ontology.explore.classes["collection"].first.id
[f622caa8-3861-464b-b7c5-d4d95881327e]     139:                         %li
[f622caa8-3861-464b-b7c5-d4d95881327e]     140:                           %code shortid
[f622caa8-3861-464b-b7c5-d4d95881327e]
[f622caa8-3861-464b-b7c5-d4d95881327e] app/views/ontologies/_widgets.html.haml:137
[f622caa8-3861-464b-b7c5-d4d95881327e] app/views/ontologies/_widgets.html.haml:136
[f622caa8-3861-464b-b7c5-d4d95881327e] app/controllers/ontologies_controller.rb:385:in `widgets'
[f622caa8-3861-464b-b7c5-d4d95881327e] app/controllers/ontologies_controller.rb:310:in `show'
F, [2022-11-02T12:08:22.669836 #9934] FATAL -- : [5c7e9b64-f0e0-4553-aa15-1dbbe0db9675]
[5c7e9b64-f0e0-4553-aa15-1dbbe0db9675] NoMethodError (undefined method `first' for nil:NilClass):
[5c7e9b64-f0e0-4553-aa15-1dbbe0db9675]
[5c7e9b64-f0e0-4553-aa15-1dbbe0db9675] app/controllers/application_controller.rb:400:in `get_class'
[5c7e9b64-f0e0-4553-aa15-1dbbe0db9675] app/controllers/concepts_controller.rb:84:in `show_tree'
@syphax-bouazzouni
Copy link
Contributor

syphax-bouazzouni commented Nov 2, 2022

It's funny because we resolved/discussed this issue just last week, see ontoportal-lirmm#99

For now what we do at Agroportal is to hide the tabs classes, mappings, instances, schemes, collections,..., so that those calls are never sent.

For now, I can't really do a pull request about this small change because our two codes diverged too much. (see #223)

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