diff --git a/tags/tags-impl/impl/src/java/org/sakaiproject/tags/impl/rest/TagServiceEntityProvider.java b/tags/tags-impl/impl/src/java/org/sakaiproject/tags/impl/rest/TagServiceEntityProvider.java index 2ec7c58bbf52..357054326900 100644 --- a/tags/tags-impl/impl/src/java/org/sakaiproject/tags/impl/rest/TagServiceEntityProvider.java +++ b/tags/tags-impl/impl/src/java/org/sakaiproject/tags/impl/rest/TagServiceEntityProvider.java @@ -217,16 +217,15 @@ public JSONObject getTagsPaginatedByPrefixInLabel(EntityView view, Map params) { - try { - WrappedParams wp = new WrappedParams(params); - String itemId = wp.getString("itemId"); - String siteId = wp.getString("siteId"); + WrappedParams wp = new WrappedParams(params); + String itemId = wp.getString("itemId"); + String siteId = wp.getString("siteId"); + try { List tagList = tagService().getAssociatedTagsForItem(siteId, itemId); - return buildtagJsonOject(tagList, tagList.size()); } catch (Exception e) { - log.error("Error calling getTagsByItemId:", e); + log.error("Could not get tag with itemId={} in site={}, {}", itemId, siteId, e); return null; } }