Skip to content

Commit

Permalink
theses: marshmallow doesn't find error
Browse files Browse the repository at this point in the history
* but opensearch validation does
  • Loading branch information
utnapischtim committed Apr 23, 2024
1 parent 87d1a95 commit 0490166
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions invenio_workflows_tugraz/theses/theses.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from invenio_records_marc21.services.record.types import ACNumber
from invenio_records_resources.services.records.results import RecordItem
from marshmallow.exceptions import ValidationError
from opensearchpy.exceptions import RequestError
from sqlalchemy.orm.exc import NoResultFound, StaleDataError

from ..proxies import current_workflows_tugraz
Expand Down Expand Up @@ -312,6 +313,9 @@ def update_func(
except ValidationError as error:
msg = f"ValidationError cms_id: {cms_id}, error: {error}"
raise RuntimeError(msg) from error
except RequestError as error:
msg = f"RequestError cms_id: {cms_id}, error: {error}"
raise RuntimeError(msg) from error

theses_service.set_state(identity, id_=marc_id, state="updated_in_repo")

Expand Down

0 comments on commit 0490166

Please sign in to comment.