Make CcmObject resolver fault tolerant
parent
c17d2b40db
commit
4d4cda372c
|
|
@ -57,14 +57,15 @@ public class CcmObjectIdResolver implements Serializable, ObjectIdResolver {
|
||||||
.createCdiUtil()
|
.createCdiUtil()
|
||||||
.findBean(CcmObjectRepository.class)
|
.findBean(CcmObjectRepository.class)
|
||||||
.findFirstObjectByUuid(id.key.toString())
|
.findFirstObjectByUuid(id.key.toString())
|
||||||
.orElseThrow(
|
.orElse(null);
|
||||||
() -> new IllegalArgumentException(
|
// .orElseThrow(
|
||||||
String.format(
|
// () -> new IllegalArgumentException(
|
||||||
"No CcmObject with UUID %s in the database.",
|
// String.format(
|
||||||
id.key.toString()
|
// "No CcmObject with UUID %s in the database.",
|
||||||
)
|
// id.key.toString()
|
||||||
)
|
// )
|
||||||
);
|
// )
|
||||||
|
// );
|
||||||
} catch (NonUniqueResultException ex) {
|
} catch (NonUniqueResultException ex) {
|
||||||
throw new UnexpectedErrorException(
|
throw new UnexpectedErrorException(
|
||||||
String.format(
|
String.format(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue