Skip to content

Commit

Permalink
Add exception handling for retrieval of active webpages
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus-87 committed May 27, 2024
1 parent 0efba6a commit 4765f00
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ public PageResponse<Webpage> findSubpages(UUID uuid, PageRequest pageRequest)
}

public Webpage getActiveByUuid(UUID uuid, Locale locale) throws TechnicalException {
return doGetRequestForObject(
String.format("%s/%s?active=true&pLocale=%s", baseEndpoint, uuid, locale));
try {
return doGetRequestForObject(
String.format("%s/%s?active=true&pLocale=%s", baseEndpoint, uuid, locale));
} catch (ResourceNotFoundException e) {
return null;
}
}

public List<Webpage> getActiveChildrenTree(UUID uuid) throws TechnicalException {
Expand Down

0 comments on commit 4765f00

Please sign in to comment.