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 request validation #164

Open
alexskr opened this issue Sep 27, 2024 · 0 comments
Open

improve request validation #164

alexskr opened this issue Sep 27, 2024 · 0 comments

Comments

@alexskr
Copy link
Member

alexskr commented Sep 27, 2024

following query results in 500 error instead of the 400
/search?q=melanoma&ontologies[]=SNOMEDCT&ontologies[]=LOINC

this particular call not constructed correctly but API should improve request validation to handle this appropriately.

/srv/ontoportal/ontologies_api/releases/20240927040643/helpers/application_helper.rb:186:in `block in ontologies_param'
/srv/ontoportal/ontologies_api/releases/20240927040643/helpers/application_helper.rb:186:in `map'
/srv/ontoportal/ontologies_api/releases/20240927040643/helpers/application_helper.rb:186:in `ontologies_param'
/srv/ontoportal/ontologies_api/releases/20240927040643/helpers/application_helper.rb:314:in `ontology_objects_from_params'
/srv/ontoportal/ontologies_api/releases/20240927040643/helpers/application_helper.rb:202:in `restricted_ontologies'
/srv/ontoportal/ontologies_api/releases/20240927040643/helpers/search_helper.rb:139:in `get_term_search_query'
/srv/ontoportal/ontologies_api/releases/20240927040643/controllers/search_controller.rb:21:in `process_search'
/srv/ontoportal/ontologies_api/releases/20240927040643/controllers/search_controller.rb:8:in `block(2 levels) in <class

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

1 participant