Detect dupe: null item ref in ex message

This commit is contained in:
Kim Shepherd
2024-02-09 11:17:13 +13:00
parent f4b6379d36
commit 9fc5b71ae3

View File

@@ -253,7 +253,7 @@ public class DuplicateDetectionServiceImpl implements DuplicateDetectionService
// If the item is null or otherwise invalid (template, etc) then throw an appropriate error
if (item == null) {
throw new ResourceNotFoundException("No such item: " + item);
throw new ResourceNotFoundException("Duplicate search error: item is null");
}
if (item.getTemplateItemOf() != null) {
throw new IllegalArgumentException("Cannot get duplicates for template item");