Closed alexskr closed 1 year ago
Adding more information since it took me a while to figure out how to reproduce this error in my local dev environment. The URL pattern that triggers the above code is /ajax_concepts/:ontology, and you need to pass a valid class id as part of the query string, e.g.:
I couldn't find any functionality in the current Rails application that will generate a request with this pattern. Maybe I'm missing something though.
Hi @jvendetti , I met with this call while working on this https://github.com/ncbo/bioportal_web_ui/pull/223
And I think that this is where it is called
The request parameter for concept id can be id
like in your example, but also conceptid
(see https://github.com/ncbo/bioportal_web_ui/blob/master/app/controllers/concepts_controller.rb#L10)
It is used to get concept/class details in ajax by the ontology_viewer, when you click for a concept in the tree view.
The bug occurs when you try to access that link with a regular call, which will call the no-more-used block (the else block) https://github.com/ncbo/bioportal_web_ui/blob/master/app/controllers/concepts_controller.rb#L35
I hope this help (and that I'm not off topic)
Thanks for the additional details Syphax. I had assumed there would be a way to manually trigger the else block beginning on line 26 from the Rails application.
Our New Relic monitoring software is reporting a large number of errors from this URL pattern that come in as regular calls and trigger the else block. Roughly 7K errors over the last 7 days:
we are seeing a number of the following errors in the logs: