File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
metasvc-server/business/src/main/java/io/github/dbmdz/metadata/server/business/impl/service/identifiable/entity Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
7
7
## Unreleased
8
8
9
+ ### Added
10
+
11
+ - More detailed error message to WEMI filling procedure
12
+
9
13
## [ 9.5.1] ( https://github.com/dbmdz/metadata-service/releases/tag/9.5.1 ) - 2025-01-22
10
14
11
15
### Fixed
Original file line number Diff line number Diff line change @@ -373,7 +373,23 @@ private void expandByWemiObjects(DigitalObject digitalObject) throws ServiceExce
373
373
manifestationsWithWorks .parallelStream ()
374
374
.filter (m -> Objects .equals (m .getUuid (), item .getManifestation ().getUuid ()))
375
375
.findFirst ()
376
- .get (); // must be there otherwise the SQL in getAllManifestationAndWorkUuids is wrong
376
+ // must be there otherwise the SQL in getAllManifestationAndWorkUuids is wrong
377
+ .orElseThrow (
378
+ () ->
379
+ new ServiceException (
380
+ """
381
+ The item's manifestation could not be found although there must be one!
382
+ Item: %s;
383
+ Manifestation acc. to item: %s;
384
+ DigitalObject: %s
385
+ """
386
+ .formatted (
387
+ item .getUuid ().toString (),
388
+ Optional .ofNullable (item .getManifestation ())
389
+ .map (Manifestation ::getUuid )
390
+ .map (UUID ::toString )
391
+ .orElse ("<no UUID in manifestation>" ),
392
+ digitalObject .getUuid ().toString ())));
377
393
item .setManifestation (manifestation );
378
394
setNewestLastModified .accept (digitalObject , manifestation );
379
395
You can’t perform that action at this time.
0 commit comments