At the moment we are catching low levels exceptions suchs as NoResultFound in the resource layer, that can potentially hide issues.
The service layer should catch the exception when resolving the record and raise a proper error that can be caught in the resource layer.
At the moment we are catching low levels exceptions suchs as NoResultFound in the resource layer, that can potentially hide issues. The service layer should catch the exception when resolving the record and raise a proper error that can be caught in the resource layer.
See here example: https://github.com/inveniosoftware/invenio-app-rdm/blob/master/invenio_app_rdm/records_ui/views/decorators.py#L175
Here original comment: https://github.com/inveniosoftware/invenio-rdm-records/pull/1604/files#r1394256328