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

Querying an ontology by entity type and IRI returns status 500 when provided IRI does not match provided entity type #772

Open
SArndt-TIB opened this issue Oct 23, 2024 · 1 comment
Labels

Comments

@SArndt-TIB
Copy link

Hi everyone,

one of our users reported unexpected behaviour for our ols3-based system. The same behaviour is visible on ols4-based systems, though. I will provide their original bug description in your template with exmples from our service and from the running OLS-instance from EBI. Thanks for looking into this and letting me know if anything can be done about it. Thanks, and all the best, Susanne

Describe the bug
Querying an ontology by entities type (term, individual, property) and IRI returns status 500 when the provided IRI does not match the provided entity type.

To Reproduce
The bug triggers in the following OLS3 scenarios:

  • Query the /ontologies/{ontology}/terms endpoint with the IRI parameter set to an IRI of a property or individual.
  • Query the /ontologies/{ontology}/individuals endpoint with the IRI parameter set to an IRI of a property or term.
  • Query the /ontologies/{ontology}/properties endpoint with the IRI parameter set to an IRI of a term or individual.

Example of querying a term using the /ontologies/{ontology}/properties endpoint (at TIB):
https://service.tib.eu/ts4tib/api/ontologies/abcd/properties?iri=http%3A%2F%2Frs.tdwg.org%2Fabcd%2Fterms%2FBotanicalGardenUnit

Example from EBI OLS4 endpoint:
https://www.ebi.ac.uk/ols4/api/ontologies/bco/properties/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FBCO_0000031

Expected behavior
The server should respond with an empty page or status 404.

Additional context
Used browser: Windows 10, Firefox 131.0.3

@SArndt-TIB SArndt-TIB added the bug label Oct 23, 2024
@haideriqbal
Copy link
Collaborator

Hi, we will be updating the API to return 404 in cases where the wrong IRI is specified. Thank you for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants