inveniosoftware / invenio-vocabularies

Invenio module for managing vocabularies.
https://invenio-vocabularies.readthedocs.io
MIT License
2 stars 40 forks source link

facets: handle non-existent vocabulary type #243

Closed ppanero closed 1 year ago

ppanero commented 1 year ago

In invenio-vocabularies we have read, read_all and read_many. When searching for generic vocabularies, we give two parameters vocabulary type and ids (e.g. resourcetype and publication). In the case that publication does not exist the result would be:

However, all three methods assume that the vocabulary type (e.g. resourcetype) exists in db (we are querying .one() with no try/except). Then, it make the search page with a 404 because a NoResultFound is risen. It leads me to:

ppanero commented 1 year ago

How it looks:

Screenshot 2023-01-06 at 16 37 59

ppanero commented 1 year ago

test fail due to missing requirement https://github.com/inveniosoftware/invenio-records-resources/pull/435