From 5677e1e3fe7b85c417f043e510657d6bb16b00cc Mon Sep 17 00:00:00 2001 From: Mohamed Rashd Date: Tue, 24 May 2022 21:13:26 +0530 Subject: [PATCH] Better feedback message/log if favicon/logo white label images not found --- .../mgt/jaxrs/service/impl/WhiteLabelServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/WhiteLabelServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/WhiteLabelServiceImpl.java index 0946ccb454f..901885985db 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/WhiteLabelServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/WhiteLabelServiceImpl.java @@ -55,7 +55,8 @@ public class WhiteLabelServiceImpl implements WhiteLabelService { byte[] fileContent = DeviceMgtAPIUtils.getWhiteLabelManagementService().getWhiteLabelFavicon(); return sendFileStream(fileContent); } catch (NotFoundException e) { - String msg = "Favicon not found this tenant."; + String msg = "Favicon white label image cannot be found in the system. Updating the whitelabel theme might" + + "help restore it"; log.error(msg, e); return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch (MetadataManagementException e) { @@ -73,7 +74,8 @@ public class WhiteLabelServiceImpl implements WhiteLabelService { byte[] fileContent = DeviceMgtAPIUtils.getWhiteLabelManagementService().getWhiteLabelLogo(); return sendFileStream(fileContent); } catch (NotFoundException e) { - String msg = "Logo not found for this tenant."; + String msg = "Logo white label image cannot be found in the system. Updating the whitelabel theme might" + + "help restore it"; log.error(msg, e); return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch (MetadataManagementException e) {