Skip to content

Commit 0798d4b

Browse files
committed
report an error when path does not exist.
1 parent 82ee3c0 commit 0798d4b

File tree

1 file changed

+6
-1
lines changed
  • aemdesign-aem-services/src/main/java/design/aem/models/v2/lists

1 file changed

+6
-1
lines changed

aemdesign-aem-services/src/main/java/design/aem/models/v2/lists/List.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,12 @@ protected void populateChildListItems(String path, Boolean flat) {
723723

724724
Map<String, String> childMap = new HashMap<>();
725725
Page rootPage = getPageManager().getPage(path);
726-
childMap.put("path", rootPage.getPath());
726+
if (rootPage != null) {
727+
childMap.put("path", rootPage.getPath());
728+
} else {
729+
LOGGER.error("populateChildListItems: could not find path {}", path);
730+
childMap.put("path", path);
731+
}
727732

728733
if (flat) {
729734
childMap.put("path.flat", "true");

0 commit comments

Comments
 (0)